今天要登錄公司的一臺Linux server, 當然還是用Poderosa.
Poderosa提供了三種SSH的登錄方式:
- Password
- Keyboard Interaction
- Public Key
我選擇了第一種常用的方式, 填入用戶和密碼,然後登陸, 可是一直提示 "Authentication failed",
很是鬱悶, 密碼肯定是對的,可是就是不能登錄, 還是頭一次遇到這個問題.
後來改成了Keyboard Interaction 的方式, 先連上, 然後手動輸入密碼就可以正確的登錄了.
於是搜索了一下SSH協議的登錄方式,具體可以參考這裏:
http://www.ssh.com/support/documentation/online/ssh/adminguide/32/Authentication.html
我之所以不能用password的方式登錄是因爲管理員出於安全性考慮,
將SSH的配置文件/etc/ssh/sshd_config中屬性
PasswordAuthentication 設置成了No, 這樣就無法通過Password的方式登錄了.
這個屬性的默認值通常是Yes.
對於Keyboard Interactive的登錄方式配置參數如下:
1. OpenSSH - /etc/ssh/sshd_config
PasswordAuthentication no
ChallengeResponseAuthentication yes
2. SSH2 (Tectia) - /etc/ssh2/sshd2_config
AllowedAuthentications publickey,keyboard-interactive
AuthKbdInt.Optional pam,password
AuthKbdInt.Required password
修改完配置文件後需要重啓ssh, /etc/init.d/sshd restart;
至於另外一種Public key的登錄方式就是使用Key登錄, 可以使用這種方式達到自動登錄的目的, 具體可以參考:
http://hi.csdn.net/link.php?url=http://blog.csdn.net%2Fminico