python - run ipython notebook remotely through ssh tunneling -


i wondering if can use ipython notebook remotely ssh twice. scenario is: machine b machine want run ipython notebook. however, allowed access machine b through server (machine a) first. there tutorials using ipython notebook remotely, none of them mentions situation i've encountered.

thanks in advance !

assuming referring ssh tunnelling, , ipython notebook servering on port 1234 on machine b:

if machine can access machine b on port, can setup machine forward remote port via ssh:

ssh -l 9999:machineb.com:1234 -n machinea.com 

this says

ssh machinea.com without executing remote command (-n) , setup machine forward requests client port 9999, on ssh tunnel, machine b port 1234

however if machine can access machine b via ssh, need create 2 tunnels. 1 client pc machinea, , machinea machineb. this, 2 tunnels connect local port on machinea instead of remote port:

ssh -l 9999:localhost:8888 machinea.com ssh -l 8888:localhost:1234 -n machineb.com 

this says

ssh machinea.com , setup machine forward requests our client pc port 9999, on ssh tunnel, machine port 8888. execute command "ssh -l 8888:localhost:1234 -n machineb.com". command sets second tunnel machinea port 8888 machineb port 1234 (where ipython listening).

now, command running in background, connect local pc port 9999. first ssh tunnel forward request machinea connects localhost:8888, second ssh tunnel forward machineb connects localhost:1234.

note machinea need able connect machineb automatically (using public/private key authentication) work in single command.

here post explains ssh tunnelling nicely https://superuser.com/questions/96489/ssh-tunnel-via-multiple-hops


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -