From 565139d4f7dc28c813e078eec3d9d194bc89bc61 Mon Sep 17 00:00:00 2001 From: mking Date: Wed, 3 Apr 2024 14:16:36 -0500 Subject: [PATCH] Including information on ssh configuration files --- SBNYoung/Basic_Computing.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/SBNYoung/Basic_Computing.md b/SBNYoung/Basic_Computing.md index f4212f773..471fdba9e 100644 --- a/SBNYoung/Basic_Computing.md +++ b/SBNYoung/Basic_Computing.md @@ -19,6 +19,39 @@ All key information and connection details for relevant meetings will be sent ou - There is also an SBN-wide slack workspace. This is where most day-to-day conversations happen. You should be able to find anyone on the experiment here, there are also channels for different groups within the experiments which you can join (e.g. #sbn-young). Ask your supervisor to add you to this slack workspace. - All important documents, including slides from all internal meetings can be found on the [docDB](https://sbn-docdb.fnal.gov/cgi-bin/sso/DocumentDatabase), you should be able to access this through Fermilab's single sign on once you have your services account (see above). + +#### SSH +SSH stands for Secure Shell Protocol. We use it for remote login onto Fermilab servers. + +The basic command structure is +`ssh -KXY mking@dunegpvm13@fnal.gov` +##### Configuration Files +On your local computer, there are configuration files that specify some configurations for connecting to remote servers. There are system-wide and user-specific configuration files, with the user-specific ones taking precedence. + +- /etc/ssh/ssh_config is the system-wide configuration file. This file provides defaults for users, and the user can be changed in per-user configuration files or on the command line. +- /home/matt/.ssh/config is my local user configuration file on my local computer + +A basic configuration (to connect me to dunegpvm13) looks like the following: + +``` +Host dunegpvm13.fnal.gov + HostName dunegpvm13.fnal.gov + GSSAPIAuthentication yes + ForwardX11 yes + ForwardX11Trusted yes + User mking + GSSAPIDelegateCredentials yes + ``` + +This declares the configuration for sshing into the dunegpvm13 machine +- GSSAPI Authentication is the requirement for kerberos authentication to SSH +- ForwardX11 allows for the -X option when sshing e.g. `ssh -XY mking@dunegpvm13@fnal.gov`. This allows for popup windows when sshing +- User mking specifies that I can ssh onto this host as that user +- GSSAPIDelegateCredentials passes on your kerberos identity/authentication onto your user on the server. +###### Local Forwarding + + + #### VNC Once you're able to ssh into the fermilab clusters and are working on these machines it is often useful to be able to view windows such as event displays or plots. This can be done by using a VNC, there are some useful instructions for this on an [SBND page](https://sbnsoftware.github.io/sbndcode_wiki/Viewing_events_remotely_with_VNC.html).