My question is very similar to this question: Remote into Linux workstation behind a firewall
My work has firewall and ssh server. The ssh server is listening to the default port 22. Normally I don't require a GUI so I just ssh into the ssh server from a home computer (MacBook) and then ssh into my personal work computer (Ubuntu 14.04) on the lan.
ssh me@myPersonalWorkComputer #on the workSSHServer
Now I would like to access my work computer (running Ubuntu 14.04) from my personal computer on my home network using a GUI. I thought I did everything right using NoMachine but I think I need some pointers.
NoMachine Service (a remote desktop service) is running on my personal work computer on port 4001. (I don't anything when I run
netstat -na | grep 4001 though)
I did ssh port forwarding on my MacBook (home computer):
ssh -L 4001:myPersonalWorkComputer:22 me@workSSHServer
I thought I just be able to use the No Machine client on my MacBook to remote into localhost:4001 and get redirected to my personal work computer but it isn't work. Sorry I'm not super experienced here. Let me know if I can give anyone any more context/information. Am I trying something fundamentally impossible? Taking a completely wrong approach? Missing some small details?
Configuration on my MacBook:
vim /usr/NX/etc/server.cfg on my personal work computer: