I've read dozens of posts on this on these forums, but none of them seemed to help. I can ping the RP3 but not SSH in.
I have a mac (latest OSX) and am trying to SSH into a Pi 3. The Pi is running Raspbian, and is set to a static IP address. It has SSH enabled.
There is a USB to ethernet adaptor on both the mac side, and the Pi end (the Pi's built-in ethernet port is used for something else, so I can't use that for SSH). There is an ethernet cable connecting the two ethernet adaptors: so it runs between the mac and Pi.
The Pi is connected to a monitor, keyboard, mouse, and the USB to ethernet adaptor.
The Pi network is set to static IP: 192.168.111.20/24, the rest of the settings are default.
The mac has no custom network settings, and I'm using the built-in shell to ssh. The mac is also connected to the net via wifi for general internet access.
Update: Also, as way to try and rule out mac issues, I just tried SSH to the IP address with a stock windows 7 PC via Putty, and that yielded a "Connection timed out" error.
Per Jdonald's request: which ssh
yields /usr/local/bin/ssh
Per Jdonald's request: ssh_config contents include theses lines: (The entire file isn't included, since that includes work-specific information)
ssh_config.erb#22 $
CanonicalizeMaxDots 1
CanonicalizeFallbackLocal yes
# Workaround for kerberos asking for a localhost ticket
Host localhost
GSSAPIAuthentication no
GSSAPIKeyExchange no
UserKnownHostsFile /dev/null
Host *.*
ForwardX11 no
ForwardX11Trusted no
StrictHostKeyChecking ask
Host *
Port 22
Protocol 2
AddressFamily any
CanonicalizeHostname always
ForwardX11 no
ForwardX11Trusted no
StrictHostKeyChecking ask
BatchMode no
CheckHostIP yes
ConnectionAttempts 1
NumberOfPasswordPrompts 1
EscapeChar ~
Compression no
PasswordAuthentication yes
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/localhost/id_rsa
IdentityFile ~/.ssh/clusterhost/id_rsa
IdentityFile ~/.ssh/id_ed25519
IdentityFile ~/.ssh/id_ecdsa
HostbasedAuthentication yes
PubkeyAuthentication yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
GSSAPIKeyExchange yes
GSSAPITrustDns yes
PreferredAuthentications gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,password
1) I can ping via the OSX terminal, but not SSH in. It is a long ping time.
ping 192.168.111.20
And the reply is:
64 bytes from 192.168.111.20: icmp_seq=0 ttl=56 time=162.976 ms
64 bytes from 192.168.111.20: icmp_seq=1 ttl=56 time=161.413 ms
However I can not SSH in. The username is pi, the device name is rasppi.
$ ssh pi@192.168.111.20
Permission denied (publickey).
Verbose output is at the end. I've replaced my actual username name with "name".
2) I've tried variants like
ssh-keygen -R 192.168.111.20
ssh -X pi@192.168.111.20
and
ssh pi:@192.168.111.20
Any help or thoughts on what's going on?
P.S. Verbose ssh connection attempt output:
OpenSSH_7.2p2, OpenSSL 1.0.2l 25 May 2017
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 74: Applying options for *.*
debug1: /etc/ssh_config line 84: Applying options for *
debug1: Re-reading configuration after hostname canonicalisation
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 74: Applying options for *.*
debug1: /etc/ssh_config line 84: Applying options for *
debug1: Connecting to 192.168.111.20 [192.168.111.20] port 22.
debug1: using TCP window size of 65536 / 65536
debug1: Connection established.
debug1: key_load_private_cert: No such file or directory
debug1: key_load_private_cert: No such file or directory
debug1: key_load_private_cert: No such file or directory
debug1: key_load_private_cert: No such file or directory
debug1: key_load_private_type: No such file or directory
debug1: key_load_private_type: No such file or directory
debug1: key_load_private_type: No such file or directory
debug1: key_load_private_type: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_cert: No such file or directory
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/localhost/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/localhost/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/clusterhost/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/clusterhost/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/<name>/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2
debug1: match: OpenSSH_7.2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.111.20:22 as 'pi'
debug1: Miscellaneous failure (see text)
No credentials cache file found
debug1: An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2
debug1: Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14
debug1: Miscellaneous failure (see text)
unknown mech-code 2 for mech 1 3 6 1 4 1 311 2 2 10
debug1: An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7
debug1: Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: aes128-gcm@openssh.com MAC:
<implicit> compression: none
debug1: kex: client->server cipher: aes128-gcm@openssh.com MAC:
<implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa
SHA256:Y+qLMT92FSBY4m3x2bkWofdK/H9W8ovhDUXA1IEYygQ
debug1: Host '192.168.111.20' is known and matches the RSA host key.
debug1: Found key in /Users/<name>/.ssh/known_hosts:2
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/<name>/.ssh/id_rsa
debug1: Trying private key: /Users/<name>/.ssh/localhost/id_rsa
debug1: Trying private key: /Users/<name>/.ssh/clusterhost/id_rsa
debug1: Trying private key: /Users/<name>/.ssh/id_ed25519
debug1: Trying private key: /Users/<name>/.ssh/id_ecdsa
debug1: No more authentication methods to try.
Permission denied (publickey).