Automating SSH and FTP

Automating SSH Login

SSH is generally happy accepting a hash key instead of username and password, provided you can generate your keys, and get your public key placed on the destination host. What’s ironic here is that doing things the “simple” way in Windows, in a GUI, is actually kind of elaborate, while doing it the “hard” way from the command line in Linux or Unix is pretty darn easy.

If you’re stuck on the Windows side, Leo Notenboom (“Ask Leo!”) has a nice guide to generating your keys using various GUI tools at

If you are working in Linux you can directly specify RSA or DSA keys as part of your keygen command. A truly fine example using DSA by Vivek Gite is at

Automating FTP Transfers

And Leo has a more advanced how-to at

Notice in all of this that Leo suggests using no passphrase, while Vivek shows a more sophisticated solution.

CAVEAT: see what actually works on your target system!