"Connection closed by (ip adress) port 22" when trying to connect to raspberry pi with ssh

5,789

Run this command: sudo dpkg-reconfigure openssh-server.

Share:
5,789

Related videos on Youtube

user1144874
Author by

user1144874

Updated on September 18, 2022

Comments

  • user1144874
    user1144874 over 1 year

    I am having a problem when trying to connect to my raspberry pi from my ubuntu 18.04 machine. When I type ssh user@ip_adress I get this output: Connection closed by (ip adress) port 22. SSH is enabled on the raspberry pi. When I am on my raspberry pi, I can connect to the ubuntu machine without any problem.

    Any ideas about what might be preventing me from using SSH to connect to the Raspberry Pi?

    • Sam Forbis
      Sam Forbis about 4 years
      Local network? Or trying to do it over the internet?
    • user1144874
      user1144874 about 4 years
      The two systems have two different internet connections, so I guess it might be over the internet.
    • user1144874
      user1144874 about 4 years
      Both the main computer and the raspberry are in my house, so maybe it is local network.
    • Sam Forbis
      Sam Forbis about 4 years
      What OS are you running on the Pi?
    • user1144874
      user1144874 about 4 years
      On the Raspberry Pi, I am running Ubuntu MATE 18.04.2 LTS Bionic Beaver 32-bit.