Whenever I have to login to a remote server, I have to enter ssh username@hostname
and subsequently a password.
I want to save time by omitting some parameters whenever I try to login to a server. I know that one can do this:
sshpass -p 'YourPassword' ssh username@hostname
Is there anyway I can define a function in .bashrc
so that I only have to type ssh hostname
and it will automatically log me in?
man ssh_config
and add an entry for that host... – jasonwryan Sep 14 '14 at 04:55