문제

I spent to much time trying to do something which in plain words looks simple

I am at home, without firewall and all open ports. I need to ssh to the router at work where I have access to ssh port 22. My personal machine is on that subnet having internal ip address. So, what I need to do is to ssh from one machine to the second and from the second to the third. On the third I need to execute another ssh which tunnels some ports to my home machine. All that in bash script from my home. I have tried many solutions on the internet but nothing works.

The whole ideal is to get to my PC at work and run ssh tunnel for port 22 which will allow me to sshfs my work PC.

I could do it manually, by sshing to the router, that form the router to the work pc and then execute the ssh tunnel. I need a one-click solution.

Thanks in advance!

도움이 되었습니까?

해결책

Have you tried just stacking the ssh commands like ssh -t localhost ssh localhost be sure to add the -t option for each hop except the last one ssh -t localhost ssh -t localhost ssh localhost

다른 팁

Maybe try VNC? With the right setup/port forwarding, you wouldn't have to jump from 1 PC to the next.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top