How do I save my previous ssh sessions
11,721
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!
Related videos on Youtube
Author by
user247504
Updated on September 18, 2022Comments
-
user247504 almost 2 years
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
-
user247504 over 10 yearsThank you kindly for the response Wolfgang. Is there a GUI option because I have potentially hundreds of systems to access.
-
Wolfgang over 10 yearswhat 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.
-
user247504 over 10 yearsSecPanel is what I was looking for. Fantastic!!! Many thanks Wolfgang, you've made my life easier!!
-
Henning Kockerbeck almost 8 yearsIn 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.