Difference between revisions of "COMP3000 Operating Systems W23: Connecting to SCS Openstack"

From Soma-notes
Jump to navigation Jump to search
(Created page with "If you want to access the openstack environment during a video call (or when watching a movie online), please do not leave the Carleton VPN connected. You may also want to avoid your personal online activities going through the VPN or just simply . The instructions below assume you have created your VM instance with the VPN. ==Linux== <span style="color:#0000ff;font-weight:bold">ssh -J CarletonUserName@access.scs.carleton.ca VMUserName@VMIP</span> This above is the ea...")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
If you want to access the openstack environment during a video call (or when watching a movie online), please do not leave the Carleton VPN connected. You may also want to avoid your personal online activities going through the VPN or just simply . The instructions below assume you have created your VM instance with the VPN.
If you want to access the openstack environment during a video call (or when watching a movie online), please do not leave the Carleton VPN connected. You may also want to avoid your personal online activities going through the VPN or just simply need more convenience. Here are some alternative options. The instructions below assume you have created your VM instance with the VPN. Remember to replace <***> with your actual values.
==Linux==
==ProxyJump==


  <span style="color:#0000ff;font-weight:bold">ssh -J CarletonUserName@access.scs.carleton.ca VMUserName@VMIP</span>
  <span style="color:#0000ff;font-weight:bold">ssh -J <CarletonUserName>@access.scs.carleton.ca <VMUserName>@<VMIP></span>


This above is the easy and recommended way.
This above is the easy and recommended way.
If your ssh version is a bit old, you may need to add a key exchange algorithm with:
If your ssh version is a bit old, you may need to add a key exchange algorithm with:


  ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -J CarletonUserName@access.scs.carleton.ca VMUserName@VMIP
  ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -J <CarletonUserName>@access.scs.carleton.ca <VMUserName>@<VMIP>


==Linux - persistent==
==ProxyJump - persistent==


In your ssh config file (e.g., <tt>~/.ssh/config</tt>. Remember to replace <***> with actual values):
In your ssh config file (e.g., <tt>~/.ssh/config</tt> for Linux and <tt>C:\Users\<UserName>\.ssh\config</tt> for Windows 10/11):


  Host access
  Host access
Line 17: Line 17:
  KexAlgorithms +diffie-hellman-group1-sha1
  KexAlgorithms +diffie-hellman-group1-sha1
  User <CarletonUserName>
  User <CarletonUserName>
  Host 3000
  Host 134.117.*
HostName <VMIP>
  ProxyJump access
  ProxyJump access
  User <VMUserName>
  User <VMUserName>


Then you can just <tt>ssh 3000</tt>
Then you can just <tt>ssh <VMIP></tt>.


==Windows==
==Windows (older versions)==


  ssh -o ProxyCommand="C:\Windows\System32\OpenSSH\ssh.exe -W %h:%p CarletonUserName@access.scs.carleton.ca" VMUserName@VMIP
  ssh -o ProxyCommand="C:\Windows\System32\OpenSSH\ssh.exe -W %h:%p <CarletonUserName>@access.scs.carleton.ca" <VMUserName>@<VMIP>


==Legacy (two terminal windows needed)==
==Legacy (two terminal windows needed, not recommended)==


  ssh -L 1200:VMIP:22 CarletonUserName@access.scs.carleton.ca
  ssh -L 1200:<VMIP>:22 <CarletonUserName>@access.scs.carleton.ca


[stay logged in, and in another window do the following]
[stay logged in, and in another window do the following]


  ssh -p 1200 VMUserName@localhost
  ssh -p 1200 <VMUserName>@localhost


You can choose a port other than 1200.
You can choose a port other than 1200.
==If you do need GUI access in certain cases==
x2go also uses the same protocol as ssh but provides remote desktop access (which technically runs an X server on your PC). Avoid using x2go unless really needed (as it is slow due to the amount of data to transfer).
Our SCS Openstack VM has already been shipped with the server-side of x2go, so just [https://carleton.ca/scs/2021/ssh-connection-with-x2go-remote-desktop-client/ follow the instructions here] to set it up on your PC client.
==If you are tired of typing passwords==

Latest revision as of 23:25, 16 January 2023

If you want to access the openstack environment during a video call (or when watching a movie online), please do not leave the Carleton VPN connected. You may also want to avoid your personal online activities going through the VPN or just simply need more convenience. Here are some alternative options. The instructions below assume you have created your VM instance with the VPN. Remember to replace <***> with your actual values.

ProxyJump

ssh -J <CarletonUserName>@access.scs.carleton.ca <VMUserName>@<VMIP>

This above is the easy and recommended way. If your ssh version is a bit old, you may need to add a key exchange algorithm with:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -J <CarletonUserName>@access.scs.carleton.ca <VMUserName>@<VMIP>

ProxyJump - persistent

In your ssh config file (e.g., ~/.ssh/config for Linux and C:\Users\<UserName>\.ssh\config for Windows 10/11):

Host access
HostName access.scs.carleton.ca
KexAlgorithms +diffie-hellman-group1-sha1
User <CarletonUserName>
Host 134.117.*
ProxyJump access
User <VMUserName>

Then you can just ssh <VMIP>.

Windows (older versions)

ssh -o ProxyCommand="C:\Windows\System32\OpenSSH\ssh.exe -W %h:%p <CarletonUserName>@access.scs.carleton.ca" <VMUserName>@<VMIP>

Legacy (two terminal windows needed, not recommended)

ssh -L 1200:<VMIP>:22 <CarletonUserName>@access.scs.carleton.ca

[stay logged in, and in another window do the following]

ssh -p 1200 <VMUserName>@localhost

You can choose a port other than 1200.

If you do need GUI access in certain cases

x2go also uses the same protocol as ssh but provides remote desktop access (which technically runs an X server on your PC). Avoid using x2go unless really needed (as it is slow due to the amount of data to transfer).

Our SCS Openstack VM has already been shipped with the server-side of x2go, so just follow the instructions here to set it up on your PC client.

If you are tired of typing passwords