Last Updated: February 25, 2016
· usharf

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
  Port 7933
  User username

Use like this:

ssh example


ssh-copy-id -i 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

2 Responses
Add your response

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 ·