How can I access a port fowarded jupyter by ip address - ssh

I have a server running Jupyter and I use ssh port forward to access it by:
ssh -L 8888:127.0.0.1:8889 -N -T Server
so I can access it from localhost:8888 or 127.0.0.1:8889, but failed to do so from $MY_IPADDRESS:8888
I had set my Jupyter config to allow remote and listen on all ip. Any suggestion is highly appreciated.

Related

How to tunnel through a SINGLE PORT using sshuttle?

I can tunnel my whole network traffic using sshuttle by this simple following command (which digitalocean is my IP address and I have a public key, saved there):
sudo sshuttle --dns -r root#digitalocean -x digitalocean 0/0
I don't know how to make the sshuttle tunnel through one specific port (like 8800) so that I can access my local nearby server and use a browser (e.g. Firefox) tunnelled through that port: using a Manual proxy with localhost:8800 address.
I know that I can use the following command to tunnel my traffic through a specific port (like 8800), but as I don't have the password of this digitalocean server, I'm not able to use ssh to access it.
sudo ssh -N -D 8800 root#digitalocean
If anyone is still looking for similar things this is in fact very straightforward:
sshuttle --dns -r user#host:8800 0/0 -x host

SSH port forwarding: bind: Address already in use

I have a remote server which I want to ssh it and forward my local port into it.
My application is hosting port 443 on my local machine. I'm connecting to the server with gcloud. This is the command:
gcloud compute --project "**^" ssh --zone "***" "***"
The target is to allow other to communicate, on port 9000, with the server and this traffic will redirected into my local machine, on port 443. On other words, accessing server on port 9000 is equal to access my computer on port 443.
So I do ssh port forwarding
gcloud compute --project "**^" ssh --zone "***" "***" -- -L 443:127.0.0.1:9000 -N
and get back this error:
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 443
Could not request local forwarding.
What I'm doing wrong?
The correct option is -R
... -R 9000:localhost:443
linux
if you have no other ssh connection you can fix it with :
killall ssh

Connect from local PC to remote server with Docker web server

my Docker-Container is on my server.
Via SSH I can connect to the server from my local PC.
ssh user#RemoteServerIP -p 3360
From there I can connect to the Docker container via SSH
ssh userRemoteServer#DockerContainerOnServerIP -p 22
A Apache Webserver is running on the Docker-Container.
How can I access the Webserver on my local computer?
from you server try to figure out which port the apache container is using.. you can use netstat command sudo netstat -ntlp usually in the PID/Program name docker port is PID/docker-proxy .
after you know which port apache container is using, then u can access it using yourServerIP:ApacheContainerPort from you local computer
assuming of course the way you exposing apache port inside container is correct.

Unable to access ssh using ngrok

I want to expose my system for accessing via ssh.
After running this ./ngrok tcp 12345, I see:
Forwarding tcp://0.tcp.ngrok.io:15909 -> localhost:12345
In my ~/.ssh/config, I add the following lines, as I have a proxy in my workplace:
Host ngrok
Hostname 0.tcp.ngrok.io
ProxyCommand corkscrew 172.16.2.30 8080 %h %p
To test, I am trying to access my own system from my own system (another shell) via ngrok. Then finally when I access using
ssh -p 15909 ngrok
it says:
ssh_exchange_identification: Connection closed by remote host
How do I access it?
See Unable to ssh into remote Linux by ngrok
but also try this from the new shell when you want to ssh into your ngrok
ssh <username>#0.tcp.ngrok.io -p 15909
where username is the user your sshing into

Connect ipython-notebook via SSH tunnel from a remote location

I'm trying to open an ipython-notebook (which is running on a server) on a macbook from a remote location through an ssh tunnel but no data received.
This is the command for the SSH tunnel
ssh -L 5558:localhost:5558 -N -t -x user#remote-host
and this is the command I used to lunch the notebook form the server
ipython notebook --pylab=inline --port=5558 --ip=* --no-browser --notebook-dir notebooks
Than I tried to open it on a new tab with this remote-host:5558 but no data received.
Thanks in advance!
The directive -L AAAA:somehost:BBBB will cause SSH to listen on port AAAA on localhost (the machine the ssh command is run on) and forward any connection to that port, over the SSH session, to the host somehost port BBBB. So, you need to open http://localhost:5558/ in the browser on the machine you run the ssh command on.
Read this: How do I add a kernel on a remote machine in IPython (Jupyter) Notebook?
Remote jupyter kernel/kernels administration utility (the rk) here: https://github.com/korniichuk/rk