| | 13 | |
| | 14 | ==== Tips for working on a remote system |
| | 15 | |
| | 16 | ===== Handling sessions and disconnections |
| | 17 | |
| | 18 | To avoid losing your place if disconnected, use something like tmux. This will allow you to have multiple tabs, or windows, with a single ssh connection. In addition, you'll be able to reconnect to this set-up if your connection drops. |
| | 19 | |
| | 20 | Warning: On the consoles, when your reservation ends, all of your processes will be killed, including tmux sessions. |
| | 21 | |
| | 22 | ===== File management |
| | 23 | To move files between your machine and the consoles, the simplest method is something like SCP. |
| | 24 | For a graphical client, one example is !FileZilla, over scp or sftp. |
| | 25 | |
| | 26 | To move files to a node, this is normally a two step process. Local -> Console, Console -> node. |
| | 27 | |
| | 28 | By using a !ProxyJump directive in your local machine's `~/.ssh/config` file, you can do this in "1" step, but this is an advanced method. When accessing the node, your ssh client with automatically proxy the connection via the console. |
| | 29 | |
| | 30 | An example file is: |
| | 31 | {{{ |
| | 32 | Host node1.cosmos-lab.org |
| | 33 | User root |
| | 34 | ProxyJump console.cosmos-lab.org |
| | 35 | }}} |
| | 36 | |
| | 37 | |
| | 38 | For development on nodes, we recommend using git, and having both your local machine and the console or node pull from the repo. |
| | 39 | |
| | 40 | |
| | 41 | |
| | 42 | |