I am using SSH to access my Pi 3 which is connected to my home router via Ethernet. It gets an IP address via DHCP from the router and I connect to it using my laptop installed with Ubuntu without any issues.

I followed the instructions here to give my Pi a static IP and it worked fine. The Pi can be pinged with its new IP now, but I cant access the Pi via SSH on my Ubuntu laptop anymore.

I removed the SSH key from Ubuntu using rm ~/.ssh but that did not help.

When I take out the SD card and change the /etc/dhcpcd.conf to its previous DHCP setting the SSH connection works fine again.

z@vaio:~$ ssh pi@
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is SHA256:2uehpaRWZyOrjJpJbQR1bcj9RWBaeQA6DSijkicYago.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (ECDSA) to the list of known hosts.
pi@'s password: 
Permission denied, please try again.
pi@'s password: 
  • 1
    Did you restart the Pi and or SSh after changing the IP address change? – Steve Robillard Jun 2 '17 at 7:13
  • yes, several times! – hossein valizadeh Jun 2 '17 at 7:17
  • do i need to remove ssh keys on RPI ? how? – hossein valizadeh Jun 2 '17 at 7:18
  • 1
    With all those words you may have missed the key word ",host,". You need the host key in your known_hosts file. The host keys are in /etc/ssh – PaulF8080 Jun 2 '17 at 7:30
  • shall i delete them from my ubuntu? – hossein valizadeh Jun 2 '17 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.