|
|
# On Fetdatorn
|
|
|
# How the remote works from fetdatorn
|
|
|
|
|
|
Runs automatically as a startup service using `systemctl`. Find information about the service through `systemctl`. The service runs `/usr/bin/ssh -vvv -XC -NT-R ${PORT_A}:localhost:${SSH_PORT} USERNAME@EXTERNALSERVER.COM -p ${PORT_B} -o ServerAliveInterval=20`
|
|
|
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
|
|
|
|
|
|
This forwards fetdatorns port 22 to port 8090 on ini.re. The script is executed by the service called liu_reverse_ssh.service, so if it doesn't work it might need to be restarted with `systemctl restart liu_reverse_ssh`. The script connects with a ssh key found in /home/root/.ssh/inire_fia.
|
|
|
|
|
|
# Connect to Fetdatorn from your computer
|
|
|
|
|
|
`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.
|
|
|
`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
|
|
|
|
... | ... | @@ -15,13 +18,12 @@ Then add this config: |
|
|
```
|
|
|
Host jump-host
|
|
|
HostName ini.re
|
|
|
Port 22
|
|
|
User fia
|
|
|
|
|
|
Host fetdatorn
|
|
|
HostName localhost
|
|
|
Port 8090
|
|
|
User **{{Ask Simon for username}}**
|
|
|
User **{{ask for username}}**
|
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
|
```
|
|
|
|
... | ... | @@ -63,19 +65,12 @@ This is how my settings.json file look like. Note that remote.SSH.remotePlatform |
|
|
```
|
|
|
Host jump-host
|
|
|
HostName ini.re
|
|
|
Port 22
|
|
|
User fia
|
|
|
|
|
|
Host fetdatorn
|
|
|
HostName localhost
|
|
|
Port 8090
|
|
|
User **{{Ask Simon for username}}**
|
|
|
User **{{ask for username}}**
|
|
|
ProxyCommand ssh jump-host -W %h:%p
|
|
|
```
|
|
|
3. NOTE: When connecting to fetdatorn, you may be prompted to enter passwords twice.
|
|
|
|
|
|
# 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
|
|
|
|
|
|
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 |
|
|
3. NOTE: When connecting to fetdatorn, you may be prompted to enter passwords twice. |
|
|
\ No newline at end of file |