Skip to content

Latest commit

 

History

History
120 lines (95 loc) · 7.31 KB

README.md

File metadata and controls

120 lines (95 loc) · 7.31 KB

cluster-customizing

Describes how I customize my accounts in computer clusters, with some specific tips for Harvard Odyssey and NCAR Cheyenne.

Files in local are for your local computer, or any other cluster.
Files in share are for all machines (local, odyssey and cheyenne).

.ssh/config (Single sign on, for Mac or other Linux-like systems)

Back to contents

SSH ControlMaster allows you to sign on once and reuse it. You must go from same source node to same destination node.

  1. On source node, download corresponding .ssh/config, and change pchan to your username on destination node. In the example below, I have defined a nickname ody. I have appended ControlPath with -%l so that different source nodes on same file system will not interfere.
Host ody
  User pchan
  HostName login.rc.fas.harvard.edu
  ControlMaster auto
  ControlPath ~/.ssh/%r@%h:%p-%l
  1. On source node, run ssh -CY -o ServerAliveInterval=30 -fN ody to create a token (password required). This step prints nothing to screen and you are still on source node, but a token named like ~/.ssh/pchan@login.rc.fas.harvard.edu:22-localhost.localdomain is created.

  2. When token exists and is open, use nickname ody to replace username@address (examples below). Stop and redo step 2 if you are asked for password.

ssh -Y ody
rsync ody:~/some_file ~/  # file transfer
sftp ody

Publickey (No password sign on)

Back to contents

ssh-keygen
ssh-copy-id pchan@rcnx01.rc.fas.harvard.edu

https://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/

.ssh/config (No password sign on with host-based authentication)

Back to contents

Cheyenne only, across various cheyenne login nodes.

Host cheyenne?
  HostName %h.ib0

NoMachine for Odyssey (Decommissioned)

Back to contents

  • Can disconnect and reconnect without losing your session.
  • Faster graphic forwarding than X11.
  1. Avoid loading modules in bashrc.
  2. Follow instructions on RC page.
  3. I suggest saving password, and GNOME desktop in the connection file.
  4. CtrlAlt0, click Display, turn on Resize remote screen.
  5. From top-left corner, click Applications > System Tools > Terminal to open a new terminal.
  • Some keyboard shortcuts may not work. I use right click to copy and paste.

My Odyssey login practice

Back to contents

  1. Download openauth on local computer (NOT phone).
  2. Put openauth in startup. Windows user: follow steps below. Mac user: invent your way and tell me.
    1. In File Explorer, simply type startup in path line. This will bring you to C:\Users\some_user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
    2. From downloaded zip file of openauth, copy *-openauth.bat into startup folder.
    3. Edit *-openauth.bat with absolute path of JAuth.jar, e.g. start javaw -jar C:\Users\some_user\Desktop\JAuth.jar.
  3. Connect RC VPN at vpn.rc.fas.harvard.edu with username like pchan@odyssey.
  4. Login to rcnx01 (remember password for NoMachine and XShell, or ssh-copy-id).
  5. Every time after monthly maintenance, ssh -CY -o ServerAliveInterval=30 -fN rclogin14.
  6. Every time after monthly maintenance, ssh -CY -o ServerAliveInterval=30 -fN che.
  7. ssh -Y rclogin14

File transfer - ZModem

Back to contents

I like lrzsz (ZModem) for small file transfer (no need to switch to another terminal/program!).
Mac user: follow this link to set up.
Windows user: use XShell - Home/School Free Version available, or other clients that support ZModem.
After that, download sz and rz and put under ~/bin/ (this is usually in your path by default).
Now, you can run sz some_file to download and rz to upload.

File transfer - other

Back to contents

.inputrc (history-search-backward)

Back to contents

Bottons (e.g. PageUp or ) can be bound to action history-search-backward, so no need to memorize and type historical commands. In bash, this can be done by inputrc (defaults in /etc/inputrc).

  1. (Usu. Windows) If there is PageUp on your keyboard and it can go to remote server, you can download .inputrc.less and move to ~/.inputrc.
  2. If not (usu. Mac), you can download .inputrc.more and move to ~/.inputrc. This will bind to history-search-backward, instead of previous-history.
  3. For the first time, sign out and sign in, or bind -f ~/.inputrc to load the new inputrc.
  4. Now when you type cdPageUp, or ssPageUp, you will be able to use PageUp and PageDn to search historical commands. Use and instead if you used .inputrc.more. Use Ctrlc to stop searching.
  5. You might also want to do export HISTSIZE=9999 and export HISTCONTROL=ignoredups in your .bashrc to store more histories.

.vim .vimrc

Back to contents