A simple SSH config file

by

You can provide ssh with a config file if you’re connecting to many different machines with different ports, user names etc.

Create a file called “config” in your .ssh directory on your machine. This file can contain entries such as

Host Home
User chris
Port 8888
HostName chrisonline.com

Host Office
User myseriousname
Port 22
HostName machine.atwork.com

What you can do then is just type “ssh Home”and ssh will automatically pick the right user name, machine and port. This is very convenient if you have different user names on different machines. I found this information here.

Advertisements

Tags: , ,

14 Responses to “A simple SSH config file”

  1. littlebearz.com Says:

    thanks, i found it to be helpful 🙂

  2. SIMPLISM.KR » Blog Archive » [Ubuntu 10.04 LTS] ssh config 작성 - Simple is the Best! Says:

    […] https://lookherefirst.wordpress.com/2007/12/17/a-simple-ssh-config-file/ […]

  3. aarosant.com Says:

    Nice and simple, thanks!

  4. siv Says:

    thank you.great help

  5. Tom Says:

    Short and sweet. Thanks!!

  6. Gregg Says:

    Thank for posting this. Man pages are good reference – list night I needed a quick example to start from. Gotta love SSH – pretty much the best tool in any sys admin toolbox.

  7. Microsoft 2007 Product Key Says:

    Microsoft 2007 Product Key…

    […]A simple SSH config file « Look here first![…]…

  8. Using a SSH Config File « yimingcheung Says:

    […] Another article by Chris: A Simple SSH Config File […]

  9. web designer and web master Says:

    web designer and web master…

    […]A simple SSH config file « Look here first![…]…

  10. t shirts of funny uk people Says:

    t shirts of funny uk people…

    […]A simple SSH config file « Look here first![…]…

  11. 12HourWesite.com Says:

    12HourWesite.com…

    […]A simple SSH config file « Look here first![…]…

  12. web design Says:

    web design…

    […]A simple SSH config file « Look here first![…]…

  13. nando pacheco Says:

    nando pacheco…

    […]A simple SSH config file « Look here first![…]…

  14. Check My Blog Says:

    I have been browsing online more than three hours today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my view, if all web owners and bloggers made good content as you
    did, the web will be a lot more useful than ever before.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


%d bloggers like this: