Is there a good PuTTY (free telnet / ssh client) equivalent for OS X?
I know that I can just use terminal and an ssh
command, but I want some sort of application that will store connection info, passwords, logs, etc for me, much like PuTTY.
Does this exist?
Best Answer
PuTTY is a great Windows frontend, not to mention the need for an SSH client in the first place. On Linux, OS X, and most other UNIX-y based environments, SSH is generally purely command line, but still amazingly powerful.
The SSH client allows you to store an amazing amount of properties based on a given hostname, even global defaults, in the "ssh_config" client file. This file doesn't exist by default (per the comments on the question), but should be written at
~/.ssh/config
.That path equates to:
~
, your home directory, it expands on my system to/Users/jason
..ssh
, the leading dot makes it hidden. If you're in Terminal and in your home directory, you can simply runcd .ssh
and enter it.config
is the file name, it is a plain text file with configuration parameters.I use this file to control tunnels I always use, the private key needed for the connection, the username (if it differs from my local username), etc.
See the manpage, either via
man ssh_config
on your own machine which will contain the most appropriate version, or you can view it online from OpenBSD's Site.Some example contents from my ssh config file are:
Whitespace is purely personal preference, it is not required except to separate Keys from Values.
The first three lines are global properties, they affect every SSH connection. The second section is a host-specific configuration.
The
Host
line specifies the host tag you will use when invokingssh
. Ex.ssh serve
. When running that, it loads all the properties listed until the nextHost
line.Since
serve
is not necessarily a DNS name, I specify theHostname
that it should actually connect to (no, not actually mine).User
is self explanatory and there just to be explicit, and theIdentityFile
is the path to the Private Key file it uses to connect.Lastly,
LocalForward
sets up a port forwarding rule that I send through the SSH tunnel.The various syntaxes are all documented on the man page.
There is no mechanism for defining a plain text password. Password entry is ALWAYS interactive when setting up the SSH connection. If you want to log in automatically, set up Private Key Authentication. Storing plain text passwords is stupid, always.
I use this to great effect. And the best part? All your SSH configurations are incredibly portable, it's just one file that you have to backup/retain, and move between system to system! Not so portable to Windows, but who really likes dealing with the registry anyway?