I have created alias for username and it works fine
alias yb="ssh name@hostname"
It works fine, but I also want to create alias for password, Can anyone help how can I do this?
aliasbashrclinux
I have created alias for username and it works fine
alias yb="ssh name@hostname"
It works fine, but I also want to create alias for password, Can anyone help how can I do this?
Best Answer
Before we start, it's not a good thing to do... you should use ssh keys instead!
You can use
sshpass
, it's a non-interactive ssh password authentication.Install it using your package manager, for example in Debian based distributions:
then in your bashrc: