For eg:
In my machine the pwd prompt is always displayed as "Password"
$ scp sources/update_git.sh [email protected]:/sds
Password:
But I need something like below
$ scp sources/update_git.sh [email protected]:/sds
[email protected]'s password:
CodePudding user response:
Make sure password authentication is enabled on the server. In /etc/ssh/sshd_config
:
PasswordAuthentication yes
On the client side, set password as the preferred method
ssh -o PreferredAuthentications=password server2
It is sensible to add the keyboard-interactive method to the list in case the server has PasswordAuthentication
disabled
ssh -o PreferredAuthentications=password,keyboard-interactive server2
I ended up adding the following to my .ssh/config
:
Host *
ServerAliveInterval 120
VerifyHostKeyDNS yes
PreferredAuthentications publickey,password,keyboard-interactive