You are here

SSH

How to login from one computer to the other using ssh, without typing your password and forwarding the remote display.

Remote login

The secure shell, or ssh, is what we use to login remotely from one computer to another, e.g., from home you can login to the lab using ::

ssh -X yourname@domain.edu

The -X option ensures that you will be abled forward the display from the remote machine to the local one. Test that the display works by typing, for example xterm in the remote machine shell.

Login without password

On your computer:

  • ssh-keygen -t dsa
  • Press "enter" until the keys have been generated. By default the keys are written into the ~/.ssh directory. There are two keys:
  • The file id_dsa contains the private encryption key.
  • The file id_dsa.pub contains the public encryption key.

With the NFS file system, we now copy the public key which was generated into the authorized_keys file as follows: cp id_dsa.pub authorized_keys. Now when you use ssh to another computer which has this key you will no longer need to type your password to login.

If you want to add public keys from other computers to the authorized_keys files, you need to edit it with an editor that does break the long lines and add the public keys to the file.

From Windows

ssh comes by default in all Linux distributions and OS X. For Windows, you will need to use a third party application such as OpenSSH Client for Windows. This one seems to be the one most like Linux.

If you're looking for a Linux API for Windows, Cygwin (of which this is only a standalone module) seems to be very good.

OpenSSH for Windows