Single sign-on using ssh-agent
- Supported version:
Openssh 2.5.2 or later (protocol 2 and 1)
Openssh 2.1.1 (protocol 1)
- First to do
- Create a public key pair on the local desktop or the laptop machine.
- Copy the public key to the remote machines, put it in ~/.ssh/authorized_keys.
- Modify configuration file on the local machine and remote machines.
$ cd ~/.ssh
$ cp /etc/ssh/ssh_config ./config
Edit config, change the values of FowardAgent and ForwardX11 parameter to yes.
- Make sure "AllowTcpForwarding" is "yes" (maybe dafault value) in /etc/ssh/sshd_config.
- Starting ssh-agent
$ eval `ssh-agent`
$ ssh-add
After this, ssh-agent helps ssh login.
- Third paty copy.
$ scp soleil:filename etoile:
or
$ ssh soleil "scp filename etoile:"
Without ssh-agent, "-t" option is required.
$ ssh -t soleil "scp filename etoile:"
- Chain login without entering password.
$ ssh soleil
$ ssh etoile
- File transfer from outside of FW to inside via DMZ host.
$ dd if=file | ssh lune dd | ssh soleil dd of=newfile
$ tar cf - target | ssh lune dd | ssh soleil tar xf -
- Comments on configuration.
- In lune:/etc/ssh/ssh_config, when "ForwardAgent yes" is included,
[lune]$ ssh soleil ==> [soleil]$ ssh etoile .....public key will be forwarded.
Otherwise password will be required.
- In lune:/etc/ssh/ssh_config, when "ForwardX11 yes" is included,
[lune]$ ssh soleil ==> X11 clients such as xterm are available.
History
2004/10/22 Added File transfer from outside of FW to inside via DMZ host.