pssh - an SSH wrapper

The problem: using command-line ssh with alternate public keys is painful:
$ ssh -i /home/joe/keys/mykey23  joe@somepc.triumf.ca
The solution: pssh
$ pssh root@somepc.triumf.ca
$ pssh somepc
Now you can easily have different passphrases for different machines - hard ones for root, perhaps none (with "from" protection) for cluster siblings.

The companion script pscp allows implicit key file copying:

$ pscp some.doc joe@somepc.triumf.ca:
Note: multiple files must be quoted:
$ pscp "a.doc b.doc" joe@somepc.triumf.ca:
$ pscp "*.html" joe@somepc.triumf.ca:

Setup

$ cd ; cd .ssh
$ ssh-keygen -t dsa -f root@somepc
$ ln -s root@somepc root@somepc.triumf.ca
$ ssh-keygen -t dsa -f somepc
$ ln -s somepc somepc.triumf.ca
Append the one-line file somepc.pub to ~joe/.ssh/authorized_keys on somepc and root@somepc.pub to /root/.ssh/authorized_keys

Sharing one key between several machines:

$ ssh-keygen -t dsa -f hobbit
$ ln -s hobbit frodo
$ ln -s hobbit bilbo
$ ln -s hobbit sam
$ ssh sam "echo `cat hobbit.pub` >> .ssh/authorized_keys"
$ pssh sam

pssh and pscp may be run or copied from /triumfcs/linux/bin


Andrew Daviel