OpenSSH Install
- The configuration is stored in C:\ProgramData\SSH folder
- Need to comment out #Match Group Administrators section
- The ".ssh" folder must be validated for each user properly. Sometimes, if you create ".ssh", windows will create ",ssh" (comma instead of dot)
- .ssh folder should only have permissions for SYSTEM, user and administrators. No other users at all
- Make sure both SSH service and Authentication Agent services are running
PC behind firewall:
- Install Putty on the NUC
- In Putty, create a new session
- Host:
- In category on left, select Connection
- Under seconds between keepalives - set to 30
- Check Enable TCP Keepalives
- In category on left, select Connection > SSH > Auth
- Click on browse the select the key file
- In category on left, select Connection > SSH > Tunnels
- Source Port: 9999 (remember this)
- Destination: localhost:3389
- Change from Local to Remote
- Change from Auto to IPv4
- Click on Add
- In category on left, select session
- Under Save sessions, give a name "home-rdp-reverse"
- Click on Open to verify that the SSH session opens
- Create a batch file such as remote-link.bat with plink to run in a loop. plink is a putty utility where you can provide putty saved session name to execute. Something like:
- plink "home-rdp-reverse"
- Run this batch file to ensure that the connection is established properly without any issues
- Add batch file to startup so that it runs as soon as machine is started
- Restart the machine and verify
- Note: The port 9999 above is unique for this particular install. Each install will require its own source port which we can manage separately
Connected remotely:
- Open Putty on your machine and create a new session
- Repeat step 2.1 from above
- Repeat step 2.2 from above
- In category on left, select Connections > SSH > Tunnels
- Source Port: 5002
- Destination: localhost:9999 (this is the port for specific PC we want to RDP)
- Keep Local
- Change from Auto to IPv4
- Click on Add
- In category on left, select session
- Under Save sessions, give a name such as "college-server-rdp"
- Click on Open to verify that the SSH session opens
- Open Remote Desktop Connection client
- Connect to localhost:5002 (source port from above)
- Enter credentials applicable to machine in the college
Reference/ Help: https://vincetocco.com/how-to-setup-a-reverse-tunnel-with-putty/
No comments:
Post a Comment