ssh host
ssh -l username host ssh username@host
ssh -l jbloggs hessian.ma.ic.ac.uk ssh jbloggs@hessian.ma.ic.ac.uk
ssh username@host command
ssh username@host df -k
ssh username@host ls -l
ssh username@host /usr/local/bin/R --vanilla < my_program.R &
andy@riemann:~ $ ssh potomac3 The authenticity of host 'potomac3 (155.198.196.32)' can't be established. RSA key fingerprint is 6e:49:83:30:f5:c5:07:e8:15:65:22:ba:44:f5:0a:ac. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'potomac3,155.198.196.32' (RSA) to the list of known hosts. Password:
andy@riemann:~ $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/ma/a/andy/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/ma/a/andy/.ssh/id_rsa. Your public key has been saved in /home/ma/a/andy/.ssh/id_rsa.pub. The key fingerprint is: 80:d9:2c:2d:d7:4e:57:7f:a1:68:6a:d1:79:02:bc:18 andy@riemann.ma.ic.ac.uk
andy@riemann:~ $ ls -l .ssh total 64 -rw------- 1 andy mastaff 883 Nov 10 14:50 id_rsa -rw-r--r-- 1 andy mastaff 222 Nov 10 14:50 id_rsa.pub
andy@riemann:~ $ cd .ssh andy@riemann:~/.ssh $ ln -s id_rsa.pub authorized_keys
If you intend connecting to the remote system using a variety of key pairs, eg perhaps using one pair for connecting from one Maths computer to another and a different pair to connect to a Maths computer from a computer at home, then you will need to rename one of the public keys to a different name and then add them both to your authorized_keys file, each on a separate line.
andy@purdy:~$ xhost + access control disabled, clients can connect from any host
andy@purdy:~$ xhost - access control enabled, only authorized clients can connect
xhost +lovelace.ma.ic.ac.uk
andy@purdy:~$ xhost access control enabled, only authorized clients can connect INET:lovelace.ma.ic.ac.uk
ssh -X username@host
ssh -x username@host
ssh -X hessian.ma.ic.ac.uk /usr/bin/X11/xclock &
andy@anahata:~ $ ssh potomac.ma.ic.ac.uk Warning: the RSA host key for 'potomac.ma.ic.ac.uk' differs from the key for the IP address '155.198.196.144' Offending key for IP in /export/home/andy/.ssh/known_hosts:520 Matching host key in /export/home/andy/.ssh/known_hosts:878 Are you sure you want to continue connecting (yes/no)
andy@anahata:~ $ vi ~/.ssh/known_hosts 520G dd [ESC]:wq
andy@anahata:~ $ ssh presley.ma.ic.ac.uk @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The RSA host key for presley.ma.ic.ac.uk has changed, and the key for the according IP address 155.198.196.6 is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 8e:4f:ed:22:69:ab:f1:da:7c:a7:17:95:34:96:5b:fa. Please contact your system administrator. Add correct host key in /export/home/andy/.ssh/known_hosts to get rid of this message. Offending key in /export/home/andy/.ssh/known_hosts:585 RSA host key for presley.ma.ic.ac.uk has changed and you have requested strict checking. Host key verification failed.
Research Computing Manager, Department of Mathematics
last updated: 10.5.21