6

I currently have to SSH into many different systems. Is there a way to for me to save the hostname / IP of the host so that I do not have to constantly type in the hostname / IP address every time I want to start a new SSH session? Basically I would like to replicate Putty's save sessions ability on Ubuntu 12.04.4.

Kind Regards,

Tim

9

You can use the ~/.ssh/config file for this. I'll give you an example:

HOST <yourHost>
    HostName <IP or DNS of the Host>
    Port <port (just needed if other then the standard (22))>
    User <username to connect>
    IdentityFile <path to an private keyfile (optional) - you can use ~, also>

If you have more than one host just repeat this sections for every host...

to use it just type ssh <yourHost>.

Hope this helps!

| improve this answer | |
  • Thank you kindly for the response Wolfgang. Is there a GUI option because I have potentially hundreds of systems to access. – user247504 Feb 12 '14 at 16:27
  • what do you mean with "GUI option"? To edit the .ssh/config file? You can edit it with every editor you want... - or do you mean to connect by using a gui? SecPanel is such an application: apps.ubuntu.com/cat/applications/precise/secpanel as an hint: if you use the .ssh/config file and type "ssh <..>" you get also bash completion for the Hosts, listed in the config file. – Wolfgang Feb 12 '14 at 16:32
  • SecPanel is what I was looking for. Fantastic!!! Many thanks Wolfgang, you've made my life easier!! – user247504 Feb 12 '14 at 16:42
  • In addition to SecPanel, there's a similar tool called PAC Manager with additional features. For example, you can group the connections, switch between sessions in a tabbed interface or show multiple sessions in a split view. PAC Manager packages are available from GetDeb. – Henning Kockerbeck Jul 23 '16 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.