Create SSH profiles for your frequent connections on Ubuntu 18.04 using ssh_config

This is very useful if you connect to tons of servers via ssh and you need to keep record of them as profiles.

  • Edit/Create a file .ssh/config
  • Add entries in this manner:
Host blabla
User blablabla # or domain\blablabla if it's a domain user
HostName x.x.x.x

Host blabla2
User blablabla2
HostName x2.x2.x2.x2
  • Then all you need to do to connect to any of these specific connections using these specific users is to:
ssh blabla #To connect to server blabla with user blablabla

or

ssh blabla2 #To connect to server blabla2 with user blablabla2

For more info like advanced customization and features like using ssh keys, you can get help from the manual:

man ssh_config

Source:

https://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/

About SoCRaT

Research Support and Infrastructure Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s