This document describes the Secure SHell (ssh) usage at NaN. SSH is a convenient and more secure replacement for TELNET, RSH, RCP, RLOGIN. It is available for every desktop and server operating system we use at NaN. It is also one of the two methods to access the NaN intranet from the internet (PPTP being the other method).
First of all SSH is used for remote login. Secondly SCP (Secure CoPy) that comes with SSH is used for file copying between hosts. CVS actions can be done over an SSH 'pipe' to a remote CVS repository. The security mechanism of the SSH suite includes an SSH-AGENT that uses public and private keys and PASS-PHRASES with which one can create their own web of trust, resulting in 'no passwords asked' secure remote logins, remote file copies and remote CVS updates. Furthermore SSH offers X-tunneling, that is one can start an X-windows program on a remote machine and have the graphical output optionally compressed and encrypted and tunnelled through the SSH pipe to the local display.
Unix: OpenSSH (preferred) or ftp://ftp.ssh.com/pub/ssh/
A note from the ssh.com site:
ssh-2.4.0.tar.gz - latest non-commercial Unix SSH2 version. ssh-1.2.31.tar.gz - latest non-commercial Unix SSH1 version (DEPRECATED!).We still use ssh-1
ssh server ssh server.intra.blender.nl ssh glibc ssh 192.168.4.20
Here is a useful NaN intranet example:
Host * ForwardAgent yes ForwardX11 no RhostsAuthentication no RhostsRSAAuthentication no RSAAuthentication yes TISAuthentication no PasswordAuthentication yes FallBackToRsh no UseRsh no Cipher 3des Compression no KeepAlive yes
And here is a useful entry for your host on the internet from which you login to NaN.
Host www.blender.nl ForwardAgent yes ForwardX11 yes RhostsAuthentication no RhostsRSAAuthentication no RSAAuthentication yes TISAuthentication no PasswordAuthentication no FallBackToRsh no UseRsh no Cipher 3des Compression yes KeepAlive yes # User your-Unix-username-at-NaN Port 1100
and using asetenv CVS_RSH SSH
CVSROOT
environment
variable that starts with :ext:
, one can connect to the
remote CVS repository over an SSH tunnel. See also Remote CVS Access via SSH / RSH
ssh_config
, but overruling wishes set by the
client. Typically found in /etc/ssh/ RTFM SSHD(8).
First, generate your keys (do this only once) with
This will generate in yourssh-keygen
~/.ssh/
directory two files :
Only if you plan to use the ssh-agent (next chapter) you should sign your keys with a so-called pass-phrase.identity (your private key, protected with mode 0600) identity.pub (your public key)
For systems you want easy access to, copy (or concatenate) your public key to :
With this setup, no passwords are asked when you log in. At NaN you can do this on the NFS server, (bye bye security, but hey ;-) and you can log into every compile machine with no questions asked.authorized_keys
A good way to start ssh-agent is right after you log into a machine for
the first time, typically automatically from your .login
.
Because you don't want to start a new ssh-agent every time you login
some ppl wrote a script named ssh-attach.sh
around it, also attaching you to an already existing ssh-agent. Copy it
you your personal ~/bin/
directory and use it from your
.login
like this:
After this you need to add your passphrase to your just-started ssh-agent only once for all your new (trusted) connections from now on with :if ($?SSH_AUTH_SOCK == 0 && -f $HOME/.ssh/identity) then echo "Setting ssh-agent environment" eval `~/bin/ssh-attach.sh` endif
Note 1: make sure that yourssh-add
ForwardAgent
setting in your
ssh_config
file is how you want it. Also
ForwardX11
is useless if you don't have a local X server.
Note 2: test your local ssh-agent key list with :
You should see something like :ssh-add -l
1024 4c:12:96:c9:90:c0:82:75:29:2a:ae:13:40:45:88:ca your-email-address