... | ... | @@ -4,7 +4,7 @@ Runs automatically as a startup service using `systemctl`. Find information abou |
|
|
|
|
|
# Connect to Fetdatorn from your computer
|
|
|
|
|
|
`ssh -t $FIAUSER@axelwickman.com -p 723 -XC ssh $USER@localhost -p 5512 -XC` where you replace $USER with your username on fetdatorn and $FIAUSER with the remote user. Ask for passwords and usernames.
|
|
|
`ssh -t fia@ini.re -XC ssh $FIAUSEr@localhost -p 8090 -XC` where you replace $USER with your username on fetdatorn. Ask for passwords and usernames.
|
|
|
|
|
|
## Using VS Code
|
|
|
|
... | ... | @@ -12,21 +12,17 @@ Install the Remote SSH extension and go to Remote Targets (SSH) in the navigatio |
|
|
|
|
|
Then add this config:
|
|
|
|
|
|
```plaintext
|
|
|
```
|
|
|
Host jump-host
|
|
|
HostName axelwickman.com
|
|
|
Port 723
|
|
|
HostName ini.re
|
|
|
Port 22
|
|
|
User fia
|
|
|
ForwardX11 yes
|
|
|
Compression yes
|
|
|
|
|
|
Host fetdatorn
|
|
|
HostName 127.0.0.1
|
|
|
Port 5512
|
|
|
User **{{Replace with your username}}**
|
|
|
Compression yes
|
|
|
ForwardX11 yes
|
|
|
ProxyJump jump-host
|
|
|
HostName localhost
|
|
|
Port 8090
|
|
|
User **{{Ask Simon for username}}**
|
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
|
```
|
|
|
|
|
|
If you are in the lab or on the eduroam network, you can instead connect "locally" through this config:
|
... | ... | @@ -66,22 +62,20 @@ This is how my settings.json file look like. Note that remote.SSH.remotePlatform |
|
|
|
|
|
```
|
|
|
Host jump-host
|
|
|
HostName axelwickman.com
|
|
|
Port 723
|
|
|
HostName ini.re
|
|
|
Port 22
|
|
|
User fia
|
|
|
|
|
|
Host fetdatorn
|
|
|
HostName 127.0.0.1
|
|
|
Port 5512
|
|
|
HostName localhost
|
|
|
Port 8090
|
|
|
User **{{Ask Simon for username}}**
|
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
|
```
|
|
|
3. NOTE: When connecting to fetdatorn, you may be prompted to enter passwords twice.
|
|
|
|
|
|
# How the remote is supposed to work (?)
|
|
|
There's a script on at /usr/bin/liu_reverse_ssh.sh which contains:
|
|
|
ssh -vvv -XC -NT -R 5512:localhost:22 fia@axelwickman.com -p 723 -o ServerAliveInterval=20
|
|
|
|
|
|
This forwards fetdatorns port 22 to port 5512 on any interface found on axelwickman.com. Only root can execute the script (since the key us on root).
|
|
|
# How connecting from remote works
|
|
|
There's a script on fetdatorn at /usr/bin/liu_reverse_ssh.sh which contains:
|
|
|
ssh -vvv -XC -NT -R 8090:localhost:22 fia@ini.re -o ServerAliveInterval=20
|
|
|
|
|
|
https://www.ssh.com/academy/ssh/tunneling-example |
|
|
\ No newline at end of file |
|
|
This forwards fetdatorns port 22 to port 8090 on ini.re. The script is executed by the service called liu_reverse_ssh.service, so it might need to be restarted with systemctl restart liu_reverse_ssh if it doesn't work. This works because there's a ssh key on root in /home/root/.ssh/inire_fia which allows the root to connect to the server without password. |
|
|
\ No newline at end of file |