Find the answer to your Linux question:
Results 1 to 8 of 8

Thread: Rasbian and ssh

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Apr 2015
    Location
    Yorkshire, England
    Posts
    261

    Rasbian and ssh


    hi, i just setup my raspberry pi 3b. i've started the SSH daemon on the raspberry pie. when i try to ping the laptop from raspberry pi or the raspberry pi from my laptop they both work. when i try
    Code:
    ssh phil@168.192.1.XXX
    I get the following error message
    Code:
    The authenticity of host '192.168.1.XXX (192.168.1.XXX)' can't be established.
    ECDSA key fingerprint is SHA256:<alpha numeric long string>
    Are you sure you want to continue connecting
    I know very little about SSH, ip addresses and the likes.
    can anyone help me do a remote login to my raspberry pi from my laptop.

  2. #2
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    2,185
    Did you connect using keys? You may want to delete stale hosts from ~/.ssh/known_hosts.

  3. #3
    Linux User
    Join Date
    Apr 2015
    Location
    Yorkshire, England
    Posts
    261
    I'm not using keys. I'm following a tutorial at https://pythonprogramming.net/remote...y-pi-tutorials . I shouldn't have any stale hosts, this is my first adventure in ssh and networking

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Apr 2015
    Location
    Yorkshire, England
    Posts
    261
    When i type
    Code:
    ssh phil@168.192.1.XXX
    on the raspberry pi. I get the following diagnostic
    Code:
    ssh: connect to host 192.168.1.XXX port 22: connection refused
    To ssh from my laptop do i need to start ssh daemon on the laptop?

  6. #5
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    2,185
    No, the daemon is needed only in host you are connecting to. You can use -v switch to get more verbose output.

  7. #6
    Linux User
    Join Date
    Apr 2015
    Location
    Yorkshire, England
    Posts
    261
    Code:
    ssh -v phil@192.168.1.XXX
    yeilds
    Code:
    OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to 192.168.1.XXX [192.168.1.XXX] port 22.
    debug1: Connection established.
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_rsa type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_rsa-cert type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_dsa type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_dsa-cert type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_ecdsa type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_ecdsa-cert type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_ed25519 type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/phil/.ssh/id_ed25519-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
    debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Raspbian-10+deb9u1
    debug1: match: OpenSSH_7.4p1 Raspbian-10+deb9u1 pat OpenSSH* compat 0x04000000
    debug1: Authenticating to 192.168.1.XXX:22 as 'phil'
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: algorithm: curve25519-sha256@libssh.org
    debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
    debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: ecdsa-sha2-nistp256 SHA256:<alpha numeric string>
    The authenticity of host '192.168.1.XXX (192.168.1.XXX)' can't be established.
    ECDSA key fingerprint is SHA256:<alpha numeric string>.
    Are you sure you want to continue connecting (yes/no)?

  8. #7
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    2,185
    So answer the question.

  9. #8
    Linux Newbie sarlacii's Avatar
    Join Date
    May 2005
    Location
    South Africa
    Posts
    223
    -->
    You will see this message the first time that you connect to a host that you have never connected to before... and as such you are being warned that this is a first time connection. You just answer "yes" and the connection will be made. The ID key for the host will be saved to the ~/.ssh/known_hosts file. When you connect again, assuming the same host is at that IP, you will not get asked again.

    Go well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •