Machine
SSH Windows 7 PC → Windows 10 laptop → CentOS 6 virtual machine
4번독수리
2018. 3. 30. 10:49
Situation
- PC : Windows 7
- Laptop : Windows 10 + Oracle VirtualBox 5.2 + CentOS 6.8. Guest CentOS`s network setting is NAT.
- Laptop host connects to guest via ssh using VitrualBox`s port forwarding
- PC serves wireless access point with ipTIME N150UA. My laptop is connected to PC using it.
- Want to connect laptop`s guest CentOS from my PC
Solution
1. Open firewall port 22 on laptop.
2. Set interface portproxy on laptop.
cmd> netsh
netsh> interface portproxy
netsh interface portproxy> add v4tov4 listenport=22 listenaddress=* connectport=22 connectaddress=192.168.56.1
netsh interface portproxy> commit
3. Enjoy.
TODO
- Prevent SSH access to laptop from arbitrary user
References
https://www.cheonghyun.com/ko/port-forwarding-using-netsh-tool-in-windows/