... | @@ -4,7 +4,7 @@ Runs automatically as a startup service using `systemctl`. Find information abou |
... | @@ -4,7 +4,7 @@ Runs automatically as a startup service using `systemctl`. Find information abou |
|
|
|
|
|
# Connect to Fetdatorn from your computer
|
|
# 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
|
|
## Using VS Code
|
|
|
|
|
... | @@ -12,21 +12,17 @@ Install the Remote SSH extension and go to Remote Targets (SSH) in the navigatio |
... | @@ -12,21 +12,17 @@ Install the Remote SSH extension and go to Remote Targets (SSH) in the navigatio |
|
|
|
|
|
Then add this config:
|
|
Then add this config:
|
|
|
|
|
|
```plaintext
|
|
```
|
|
Host jump-host
|
|
Host jump-host
|
|
HostName axelwickman.com
|
|
HostName ini.re
|
|
Port 723
|
|
Port 22
|
|
User fia
|
|
User fia
|
|
ForwardX11 yes
|
|
|
|
Compression yes
|
|
|
|
|
|
|
|
Host fetdatorn
|
|
Host fetdatorn
|
|
HostName 127.0.0.1
|
|
HostName localhost
|
|
Port 5512
|
|
Port 8090
|
|
User **{{Replace with your username}}**
|
|
User **{{Ask Simon for username}}**
|
|
Compression yes
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
ForwardX11 yes
|
|
|
|
ProxyJump jump-host
|
|
|
|
```
|
|
```
|
|
|
|
|
|
If you are in the lab or on the eduroam network, you can instead connect "locally" through this config:
|
|
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 |
... | @@ -66,22 +62,20 @@ This is how my settings.json file look like. Note that remote.SSH.remotePlatform |
|
|
|
|
|
```
|
|
```
|
|
Host jump-host
|
|
Host jump-host
|
|
HostName axelwickman.com
|
|
HostName ini.re
|
|
Port 723
|
|
Port 22
|
|
User fia
|
|
User fia
|
|
|
|
|
|
Host fetdatorn
|
|
Host fetdatorn
|
|
HostName 127.0.0.1
|
|
HostName localhost
|
|
Port 5512
|
|
Port 8090
|
|
User **{{Ask Simon for username}}**
|
|
User **{{Ask Simon for username}}**
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
```
|
|
```
|
|
3. NOTE: When connecting to fetdatorn, you may be prompted to enter passwords twice.
|
|
3. NOTE: When connecting to fetdatorn, you may be prompted to enter passwords twice.
|
|
|
|
|
|
# How the remote is supposed to work (?)
|
|
# How connecting from remote works
|
|
There's a script on at /usr/bin/liu_reverse_ssh.sh which contains:
|
|
There's a script on fetdatorn 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
|
|
ssh -vvv -XC -NT -R 8090:localhost:22 fia@ini.re -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).
|
|
|
|
|
|
|
|
https://www.ssh.com/academy/ssh/tunneling-example |
|
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 |
|
\ No newline at end of file |