Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

PuTTy is a fine SSH client, but how do you get a workflow managed as slickly as OpenSSH on Unix? My issues with PuTTy's management are:

  1. PuTTy tools are not in my PATH (easily fixable)
  2. PuTTy seems to have no equivalent of ~/.ssh, so I end have to manually choose locations for my keypairs, and then manually tell all the tools where to find them every time
  3. The private key's read permissions seem lax (I might be wrong about this, I a klutz on Windows).
  4. Pageant doesn't run by default (easily fixable?)
  5. Other programs don't reliably find pageant

I suspect all of these problems can be fixed if I just get set my system up properly, and/or organise a nice workflow that fits into PuTTy's way of doing things. So can anyone share some success stories about managing PuTTy?

share|improve this question
    
Doesn't Putty save your keypairs under c:\users\USERNAME\.ssh? It does on my Windows7 machine. –  kobaltz Jan 5 '12 at 4:53
    
@kobaltz, only if the user tells it to. There is no default location. –  grawity Jan 5 '12 at 9:56
1  
An alternative you might want to consider is Cygwin with its openssh package and PuTTY-derived but more xterm-compatible default terminal. Admittedly that's a lot heavier than PuTTY though if all you need is ssh. –  ak2 Jan 5 '12 at 10:34
    
It's true that c:\users\USERNAME\.ssh is not a default for saving. But it would be nice if tools will look there by default when they need to read a key. Does this happen? –  Adrian Ratnapala Jan 8 '12 at 5:25

2 Answers 2

up vote 2 down vote accepted

1 is, as you said, easily fixable.

For 2, both OpenSSH and PuTTY have a concept of an "agent" - a background process holding your keys in memory. For OpenSSH this is ssh-agent, and PuTTY comes with Pageant. In both cases, the keys can be loaded once - usually at login time - after which the SSH client will simply ask the agent to sign the authentication data, without needing the location of the actual key.

The obvious advantage is not needing to re-enter the key's password every single connection, but there is more to it - both clients support agent forwarding, where you can connect to a (relatively trusted) machine and use the local agent remotely (for example, you can connect from local to hostX, from hostX to hostY, from hostY to hostZ), and the key will never leave your local machine.

3 is not a critical problem since Windows user profiles are not publicly accessible by default (I may be wrong here; will check later). Besides, your key is password-protected while on disk, and the permissions can be easily changed.

4 - just copy Pageant's shortcut into the Startup folder in Start Menu - Programs. (Alternatively, point the shortcut to your key file, to have it loaded on login.)

As for 5, cannot reproduce - I've used PuTTY and WinSCP for many years and Pageant worked fine. The only reason I can think of, is the recently introduced bug, fixed in PuTTY 0.62 - it made 0.60 core and 0.61 agent incompatible. Just upgrade to the latest version and it should work. If it doesn't, at least clarify on which programs you are trying.

share|improve this answer
    
2,4: Ok, so I guess making the keyfile easy to reach will kill too birds with one stone. 3: Yes I suppose the main thing is to encrypt it with a good password. 5: We will see. This happens on Unix to, but is OK because I understand the rules (SSH_AUTH_SOCK etc. is not being inherited). I expect Windows is no worse. –  Adrian Ratnapala Jan 8 '12 at 5:33
    
Pageant on Windows does not use environment variables (although it is possible to pass them over to Explorer); the clients use window messages to find the agent. –  grawity Jan 8 '12 at 14:51
    
I said "no worse". I didn't say it would work the same way! All I know is that it didn't work when I tried it out before. Probably after a reboot it will all be fine. –  Adrian Ratnapala Jan 9 '12 at 16:12

How to improve your PuTTY experience:

  1. Use pagent: Putty Agent will manage all of your keys for you and you can also start your known connections from it. So if you have a saved "mail server" connection, you just click your pagent icon in the task tray and select "mail server". Done.

  2. Load your keys automatically on pagent startup: This is important and saves a lot of time. You simply create a shortcut to pagent.exe and edit the path to your keyfile(s) "C:\Program Files\PuTTY\pageant.exe" C:\Path\to\myKeys\MyKey.ppk You will then start pagent with the shortcut not by going directly to the file. It will only ask you for your key passphrase once, when you load it for the first time.

  3. Let pagent handle your keys, not putty: In all of your saved putty auth configurations, remove the key and make sure agent forwarding and use pagent are checked and nothing else.enter image description here

Or use something better than PuTTY:

While most of your concerns are easily addressed, I have switched to MobaXterm. The workflow is much better overall.

  1. The application is portable: Just like putty, so you don't need admin rights to run it.

  2. Starts with a Cygwin(linux) terminal: This means you can do complex scp/sftp rsync operations that you cannot do with PuTTY.

  3. Dedicated ~/.ssh/ folder so you can build all of your configurations exactly like you would in linux. You also can use standard OpenSSH key formats instead of .ppk.

  4. Improved tabbing: You can have tabs or dedicated windows.

  5. Built in X server: You can literally run remote X windows to access graphical tools with little to no setup.

  6. Great license: They use GPLv3 for their Free Personal Edition and allow use for commercial purposes as well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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