例如:
在我的機器中,密碼提示始終顯示為“密碼”
$ scp 來源/update_git.sh [email protected]:/sds
密碼:
但我需要像下面這樣的東西
$ scp 來源/update_git.sh [email protected]:/sds
[email protected] 的密碼:
uj5u.com熱心網友回復:
確保在服務器上啟用密碼驗證。在/etc/ssh/sshd_config:
PasswordAuthentication yes
在客戶端,將密碼設定為首選方法
ssh -o PreferredAuthentications=password server2
PasswordAuthentication如果服務器已禁用,將鍵盤互動方法添加到串列中是明智的
ssh -o PreferredAuthentications=password,keyboard-interactive server2
我最終將以下內容添加到我的.ssh/config:
Host *
ServerAliveInterval 120
VerifyHostKeyDNS yes
PreferredAuthentications publickey,password,keyboard-interactive
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/458969.html
上一篇:尋找合適的埠范圍
