關於 SSH2 的三種登入方式

來源:互聯網
上載者:User

今天要登入公司的一台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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.