發(fā)行版及版本號:
debian:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
通過 apt-get install -y openssh-server
命令安裝了sshd母蛛,并修改配置文件使root用戶可以通過密碼登錄
debian:~# sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
debian:~# systemctl restart ssh.service
使用SecureCRT 7.x可以登錄械巡,但是ssh secure shell client不能登錄,提示如下:
ssh client 提示:Server responded"Algorithm negotiation failed"
Key exchange with the remote host failed. This can happen for example computer does not support the selected algorthms.
通過網(wǎng)絡(luò)搜索得知官还,openssh升級后谜酒,刪除了一些舊的加密算法,所有導(dǎo)致部分ssh clients不能登錄妻枕。根據(jù)網(wǎng)友的分享僻族,我將這些加密算法添加到sshd_config,然后重啟啟動sshd屡谐。
debian:~# cat << EOF >>/etc/ssh/sshd_config
# there are old encryption algorithms
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdg
EOF
debian:~# systemctl restart ssh.service
然后檢查ssh secure shell client述么,已經(jīng)成功登錄了。