Possible Duplicate:
Shell Script for logging into a ssh server
Autentification on SSH connection in OneLine

How could I make a SSH Login programmatically on a unix server, I don't have rights for generate public keys on the side server or extra-packages like expect. The client is a windows os, so I use putty to do the connections. Is there any way to use putty on my program or any java library for this?

marked as duplicate by Kevin, sr_, Chris Down, jasonwryan, Michael Mrozek Mar 2 '12 at 17:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    You could also generate keys somewhere else and scp the public one to the server, couldn't you? (Or does the SSH server not allow using keys?) – sr_ Mar 1 '12 at 16:46
  • The server neither not allow using public key or install extra-packages – fers Mar 1 '12 at 16:56

I don't use Putty, but rather Kitty, and there is a setting to save your password under connection -> data -> auto-login password. Putty doesn't seem to have that option.


While you could save your creds with another tool I would talk to your sysadmin and ask for pk auth first. If you are doing something legitimately they will appreciate you bringing this up with them instead of going around the system with saved creds or an autoit script, etc. I would think they would at least point you in the right direction.

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