

Ask HN: Saving SSH/Telnet Sessions in OSX - iSloth

So I&#x27;m a network admin that&#x27;s been using Windows&#x2F;PuTTY for connecting to a large number of telnet and SSH services on networking kit and servers for years.<p>However I&#x27;ve recently moved over to OSX on a Mac Book, I&#x27;m quite happy with connecting to devices via Terminal&#x2F;Console, just wondering what tips&#x2F;tricks people have for creating shortcuts to devices?<p>Would be great if it was quick to use, may be also auto-login and easy to update IP&#x27;s etc.<p>Not found anything suitable so far, so might have to throw some code together myself...
======
jballanc
If I understand your question correctly, you probably want to create an SSH
config file. See the man page for the gory details:
[https://developer.apple.com/library/mac/documentation/Darwin...](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/ssh_config.5.html)

The config file format is slightly obtuse starting out, but with it you can
create nicknames for machines, automate logging in, using different keys, etc.
It's very powerful. I've gotten to the point where all I normally do at the
CLI is `ssh staging` or `ssh dev` and I'll get to the right machine.

~~~
iSloth
I've used something similar at the moment, basically putting in /etc/hosts
entries to map a fake DNS name on my laptop e.g. "staging" to the real switch
ip address, so the command "ssh staging" works.

It works well for the common devices I access, however it's not really
scalable enough. There are easily over 1,000 unique CLI interfaces that we
support, and call me lazy but jumping in and out of spreadsheets constantly to
find the IP/Port and credentials isn't something I enjoy.

Window's with PuTTY/SecureCRT can solve some of the issues using saved
sessions that you can export and import.

However I would love something in CLI on OSX where you could type 'mgr'

Then you get a prompt like, '1) switches, 2)firewalls, 3)servers, 4)routers'.

After you hit '2' you get another prompt '1) London, 2) New York, 3) Lab' and
so on...

Finally when you select the device it opens either telnet/ssh (depending on
the device) and may be even authenticates you in, all with terminal.

Like I said it's a wish list, and I guess I will have to end up making
something my self, but no point in re-inventing the wheel if there's already
someone out there with a solution :)

------
2close4comfort
the best thing I have found so far is vssh it is worth checking out and should
fill you needs nicely.

