System/Linux
SSH 접속시 에러
Mr.Kang
2022. 1. 29. 09:58
1. "Host key verification failed" 에러
[root@localhost]# ssh -o StrictHostKeyChecking=no user@something.example.com uptime
[root@localhost]# ssh-keygen -R something.example.com
2. "The first key-exchange algorithm supported by the server is diffie-hellman-group1-sha1, which is no longer secure. Aborting connection."에러
[root@localhost]# vi /etc/ssh/sshd_config
#########맨 하단에 아래와 같이 추가
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
PasswordAuthentication yes
#KexAlgorithms diffie-hellman-group1-sha1
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
#MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com,hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96
[root@localhost]# systemctl restart ssh