-
Notifications
You must be signed in to change notification settings - Fork 0
tmux and ssh for remote access
ssh
is used to access Alienware and Zotac remotely. Currently there is an external IP address assigned by eduroam for each of the machines. To find out the IP address of the machine, on Alienware/Zotac use command:
ifconfig
It should be listed as 'inet addr' under the wifi connection.
ssh -X conditionalstudio@<inet_addr>
Password will be required.
-X option enables commands such as imgcat
which can be used to display images on the remote terminal. imgcat
needs to be installed on the remote machine however. To use imgcat
, download and install iTerm2 on MacOS. Then, iTerm2 -> Install Shell Integration.
To terminate the connection, type:
exit
scp
is a file copying protocol that is based on ssh
.
scp <path_to_file_to_be_copied> conditionalstudio@<inet_addr>:<path_to_be_copied_to>
scp conditionalstudio@<inet_addr>:<path_to_file_to_be_copied> <path_on_remote_to_be_copied_to>
tmux
is a screen multiplexer. One critical function of tmux for MI_REAS has been to keep the terminal open and the jobs running even after exiting out of remote access ssh
.
tmux
is session based. A session is one instance of bash.
tmux new -s <name_of_new_session>
From outside of tmux, type:
tmux kill-session -t <name_of_session>
You can also type exit
from within a session to terminate.
tmux a
After detaching (Ctrl-B D
) the session, attach to go back to running sessions.
These hotkeys work when you are within tmux
.
Ctrl-B D
Detach session (Return to non-tmux terminal without terminating session.)
Ctrl-B S
List all running sessions. (Then arrow keys -> ENTER or type the alphanumeric name for session.)
Ctrl-B $
Change name of session.
Ctrl-B [
Scroll mode. (Press q
to quit.)
For Ctrl-B D
for e.g., press Ctrl
and b
key together, let go, then type d
.