Quickly log in to remote servers using ssh's config file
Use ssh's config file to keep shortcuts and connection parameters to quickly login into frequently accessed servers.
In ~/.ssh/config, put:
host example
Hostname www.example.com
Port 7933
User username
Use like this:
ssh example
or:
ssh-copy-id -i id_rsa.pub example
or even so:
vim scp://example/somefile.txt
- The User parameter might not be needed, if you've already setup ssh "password-less" login
Written by Uri Sharf
Related protips
2 Responses

You can also set the IdentityFile in your config to point to your secret key.
over 1 year ago
·

That's helpful, thanks!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#