임베디드 | 라즈베리파이 | ARM | 리눅스 | Qt | 딥러닝

mac@ubuntu:~$ ssh pi@192.168.0.50
Read from socket failed: Connection reset by peer
mac@ubuntu:~$ ssh pi@192.168.0.50
Read from socket failed: Connection reset by peer
mac@ubuntu:~$ ssh pi@192.168.0.50
^[[AConnection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50
Read from socket failed: Connection reset by peer
mac@ubuntu:~$ ssh pi@192.168.0.50
Connection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50
Connection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50
^[[A
^[[AConnection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50

^[[AConnection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50

Connection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50
Connection closed by 192.168.0.50
mac@ubuntu:~$ ssh pi@192.168.0.50

라즈베리파이 이미지 설치후에 위와같이 pc에서 접속 불가하다고 나온다

분명 sudo raspi-config 에서 ssh 설정도해줬는데 왜안되지?

openssh-server, client 모두 재설치해도 마찬가지


해결바법은 아래와 같다.

라즈베리파이에서 설정해주면된다.

sudo rm /etc/ssh/ssh_host_*
sudo ssh-keygen -A
위와같이하면
ssh-keygen: generating new host key: RSA1 RSA DSA ECDSA ED25519
가 나타나면서
이제 pc에서 정상 접속이 가능해진다.