Changes between Initial Version and Version 1 of User Guide/Remote Access/Ssh Tips


Ignore:
Timestamp:
May 19, 2020, 9:05:28 PM (5 years ago)
Author:
msherman
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • User Guide/Remote Access/Ssh Tips

    v1 v1  
     1[[Include(WikiToC)]]
     2==== SSH Tunneling
     3
     4A common need is to connect to some resource on the testbed as if it were local. SSH provides this functionality. Go to the [wiki:tutorials/ssh_tunnel Configuring SSH Tunnels tutorial] to learn how to configure these.
     5 
     6
     7==== Common SSH issues
     8===== If you deleted the "@internal1" key from your profile
     9
     10As long as you have at least one public key configured in your profile, use your SSH client to connect to {{{gw.orbit-lab.org}}} and run the following commands there. You do not need to make a reservation in the scheduler for this.
     11
     12{{{
     13rm ~/.ssh/id_rsa
     14rm ~/.ssh/id_rsa.pub
     15ssh-keygen -t rsa -C "@internal1"
     16}}}
     17
     18Press 'Enter' at every prompt so that the default filename (id_rsa) and no password is used.
     19
     20Then type the following command:
     21
     22{{{
     23cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
     24}}}
     25
     26The internal key should now be restored.
     27
     28
     29===== Common ssh options for nodes
     30
     31We'd like to do a few things for convenience:
     32
     331. log into nodes as root by default
     341. allow forwarding of X11 applications
     351. Suppress annoying host key warnings
     36
     37First, log into any console, or gw.orbit-lab.org
     38
     39After logging in, create or modify the file at {{{~/.ssh/config}}}
     40
     41Add the following to the file
     42
     43{{{
     44Host sdr?-md* sdr?-s?-lg* srv?-co* srv?-lg* node?-* node??-*
     45  User root
     46  UserKnownHostsFile /dev/null
     47  StrictHostKeyChecking no
     48  ForwardX11 yes
     49}}}
     50
     51* Host: The Host line matches common naming conventions for nodes within the testbed
     52* User: root is set to match the common default for baseline
     53* !UserKnownHostsFile: is set to /dev/null to prevent saving new host keys for nodes
     54* !StrictHostKeyChecking: disables the warning message. SSH complains when host keys for a dns name change. This is a useful security feature, but is inconvenient within the testbed, where the operating system on a trusted machine changes frequently. Do not set it as a wildcard default for public endpoints, or you will be vulnerable to spoofing or man in the middle attacks.
     55* ForwardX11: allows the forwarding of graphical applications running the X11 protocol from a node back to your machine