Namespaces

Variants
Actions
Personal tools

Remote Editing

From UABgrid Documentation

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
== Visual Studio Code ==
+
= Visual Studio Code =
  
== SSH ==
+
= SSH =
  
=== With tmux ===
+
== With tmux ==
 +
 
 +
First, ssh into VM like normal:
 +
<pre>
 +
ssh blazerid@cheaha.rc.uab.edu
 +
</pre>
 +
 
 +
If you are trying to edit file on VM, not Cheaha, make sure you have tmux installed on system.
 +
 
 +
<pre>
 +
# Ubuntu
 +
sudo apt install tmux
 +
 
 +
# CentOS
 +
sudo yum install tmux
 +
</pre>
 +
 
 +
Now, create a tmux session and detach right away.
 +
 
 +
<pre>
 +
tmux new
 +
 
 +
# Ctrl+B then D
 +
^B d
 +
</pre>
 +
 
 +
You can exit this ssh connection now.
 +
<pre>
 +
exit
 +
</pre>
 +
 
 +
This time, ssh with remote command and special option <code> -t  Force pseudo-terminal allocation.</code>
 +
<pre>
 +
ssh -t blazerid@cheaha.rc.uab.edu "tmux -CC attach"
 +
</pre>

Revision as of 14:10, 1 April 2020

Visual Studio Code

SSH

With tmux

First, ssh into VM like normal:

ssh blazerid@cheaha.rc.uab.edu

If you are trying to edit file on VM, not Cheaha, make sure you have tmux installed on system.

# Ubuntu
sudo apt install tmux

# CentOS
sudo yum install tmux

Now, create a tmux session and detach right away.

tmux new

# Ctrl+B then D
^B d

You can exit this ssh connection now.

exit

This time, ssh with remote command and special option -t Force pseudo-terminal allocation.

ssh -t blazerid@cheaha.rc.uab.edu "tmux -CC attach"