1. 程式人生 > >Xshell root連線kali時提示ssh伺服器拒絕了密碼,請再試一次

Xshell root連線kali時提示ssh伺服器拒絕了密碼,請再試一次

  用Xshell root連線時顯示ssh伺服器拒絕了密碼,應該是應該是sshd的設定不允許root使用者用密碼遠端登入 
  修改 /etc/ssh/sshd_config檔案,注意,安裝了openssh才會有這個檔案,如果檔案不存在請檢查是否安裝了openssh。

sshd.png

Bash

vim /etc/ssh/sshd_config

         查詢

Bash

# Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes

        改成

Bash

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

        然後重啟ssh服務

Bash

/etc/init.d/ssh restart 
或
service ssh restart