Setting up an ssh-agent to cvs.sanger.ac.uk
- set up .ssh/authorized_keys on your local machine
- mkdir $HOME/.ssh (unless already there)
- cd $HOME/.ssh
- if you have an authorized_keys file and an identity.pub
file, see if authorized_keys contains the text from identity.pub
- if not
- ssh-keygen -t rsa1 (use your standard passphrase)
(this produces the identity.pub file)
- cat identity.pub >> authorized_keys (appends)
- get that file into your sanger home
- on your local machine:
- emacs authorized_keys
- select and copy the contents of that file (make sure you haven't
introduced incorrect newlines)
- ssh cvs.sanger.ac.uk (to get to the sanger machine)
- on the sanger machine:
- mkdir .ssh
- emacs .ssh/authorized_keys
- paste what you had copied into your clipboard
- save the file
- logout from sanger
- test ssh to sanger from your local machine:
- ssh -1 cvs.sanger.ac.uk
- it should ask you for your passphrase (not a password)
- if it doesn't debug by using ssh -1 -v cvs.sanger.ac.uk
- create the ssh1 command (if you don't already have an ssh1 command)
- in a bin/ directory that is in your path, and that you
can write to, do this:
- echo "ssh -1 $*" > ssh1
- chmod +x ssh1
- rehash
- now test ssh1:
- ssh1 cvs.sanger.ac.uk
- setup the CVS_RSH variable, in your .login or .cshrc
- setenv CVS_RSH ssh1
- now open a new terminal window so that the change will take effect
(or use the source command)
- test that:
- cd to a directory that was checked out from sanger
- cvs update
- it should ask you for a passphrase
- start up your agent:
- eval `ssh-agent`
- ssh-add
- test cvs again. this time it should not ask for a passphrase
or password
- to alert a new terminal window to the presence of the agent:
- in the terminal in which the agent is already running:
- env | grep SSH_A
- in the new terminal
- set the environment following environment variables with the
values from the first terminal
- SSH_AUTH_SOCK
- SSH_AGENT_PID