새 공유기를 사고, 그 공유기로 ssh 접속을 하려 하니 오류가 발생한다. 이건, 공개키만을 사용하기로 설정을 해놔서 그런 듯 하다.
$ cat ~/.ssh/config PreferredAuthentications publickey IdentityFile ~/.ssh/id_ed25519 IdentitiesOnly yes .....
당연히, 아직 그 공유기에는 공개키를 복사해놓지 않았다.
이럴 때는 강제로 password 를 사용하도록 설정해야 ssh 접속이 가능해진다.
ssh serverid@주소 -o PreferredAuthentications=password # 또는 더 확실하게 ssh serverid@주소 -o PreferredAuthentications=password -o PubkeyAuthentication=no
이전에 쓴 글에도 있는 내용이지만, 이 부분만 따로 떼어 여기에 다시 정리해봤다.