I'm trying to access Jupyter notebooks that are installed on AWS and I want to use a windows-10 machine to access it. The jupyter system sits behind a jump host (bastion) on aws. The process works for macs in the following way
- Instructions exist to create a ssh tunnel
- Magically the notebook is available on a browser by doing localhost:8223
The mac command for it looks like
ssh -i /pathto.id_rsa -L 8223:<some name>:8223 -f -o <some other url>
What I've been able to accomplish is the following.
- Installed putty and pageant. Set up key forwarding on putty and been able to log in to the bastion host.
- I tried foxyproxy on chrome but couldn't make much headway there.
How do I access this Jupyter notebook from windows?
Again, the set up is
windows --> [bastion] --> jupyter
I'm totally lost, any pointers or step by step instructions is much appreciated.
Try this article from my blog: https://vrnchndk.in/2017/01/27/access-blocked-websites-using-ssh-tunnel/
It has step by step instructions with screenshots as well.
Related
I'm working on a project where the servers and Mysql data bases are inaccessible from my local machine unless I ssh to a remote using terminal. However, I find programming with Jupyter Notebooks the best environment for me. I really miss it as I find programming with just vim remotely via terminal a bit cumbersome. I was wondering if there was a way to launch Jupyter notebook from the server and have my local browser open it up- so I can code from my browser but it would be running from the terminal/remote-server via ssh- so that ways my code can actually connect to my database from my browser via the remote and I can use the interactiveness of a Jupyter notebook to speed up my development. Any ideas? remote is ubuntu and mine is a mac. Thanks
This is pretty simple. You just need to install the jupyter notebook server on your remote machine and make it open to the web, protected by a password to avoid unintended use.
On the remote server, first install Jupyter:
pip3 install jupyter
Then follow this guide to secure it with a password.
At last you can launch it with:
jupyter notebook --ip='*'
This tells Jupyter to make it available from any ip and not only from localhost.
Please do protect it with a password, otherwise very nasty things could happen to your server.
After logging into the VM using vagrant ssh using GitBash on Windows 10, I don't see any directory prompts. While it does run the python web forum (for a tutorial on Udacity on Intro to Relational Databases), it won't let me run psql so I can continue the lesson. I can change directories, list information about the files, and run python but the prompt isn't working like normal.
Screenshot here: screenshot.
Please note the forum is running, this screenshot was taken after I exited and restarted vagrant.
Vagrant version 1.9.6
Ubuntu version 16.04.2 LTS
All programs installed or running in administrator mode.
I had the same problem attempting to set up Laravel Homestead - in my case it seems to be an issue with Git Bash / MINGW64.
My work-around was to use PuTTY
Install PuTTY, PuTTYgen
Create a .ppk of the key you're using to connect to the vagrant vm by loading the private key in PuTTYgen and saving the private key
Create a new PuTTY session with your vagrant details, in my case I just copied what was displayed after running "vagrant up" as far as SSH address, username (my PuTTY session Host Name would be "vagrant#localhost" port: 2222)
specify the ppk in the PuTTY configuration under Connection-> SSH-> Auth-> Private key for authentication
In short, try connecting with PuTTY or some other terminal emulator and see if you have any luck.
I wasn't able to get Git Bash to work, but the show window for the Oracle VM VirtualBox Manager does work just fine. I've been using Git Bash to start the VM, then switch to the Oracle VM UI window.
I had the same issue with truing to connect to a virtual Homestead session (Laravel) using virtual box and I was trying to connect via Gitbash MINGW64 as well.
I tried the same in cmd.exe (command: vagrant ssh) and it worked.
So should be issue with Git bash.
I'm trying to run a Docker container as a Jupyter Notebook on Windows 10. As shown in the screen grab, the notebook appears to be running on localhost:8888, but my browsers (Chrome and Edge) return a 'connection refused' error. I've disabled my firewall (temporarily), but that didn't help. Also, netstat does not list the port as being in use. Any idea what's going on?
Try the following:
docker run -p 8888:8888 -it simonwalkersamuel/bloch_tf:latest
-p 8888:8888 will map container port 8888 to host port 8888.
TLDR make sure you mapped the ports using -p 8888:8888. If didn't work, try 192.168.99.100:8888 instead of localhost:8888.
Situation:
I had a slightly different problem: Although I mapped the ports using -p 8888:8888, I still see the connection error when I try to reach localhost:8888 in all browsers. The firewall is checked and seems OK. It was very confusing because exactly same docker image works on my other Win 10 laptop at work.
Solution:
I have two slightly different Win 10 on my laptops. The one that has connection difficulty runs a Win 10 Home whereas the other one has a Win 10 Professional. This means, the problematic laptop only runs Docker Tools not the conventional Docker CE. Therefore, it maps communicates with the OS using 192.168.99.100 IP not the usual 127.0.0.1 or localhost. So, instead of localhost:8888 just used 192.168.99.100:8888 and it worked.
Confession!
I usually use my work laptop for running Jupyter on docker. Therefore, I did not pay enough attention to the welcome message of Docker Quickstart Terminal which clearly says docker is configured to use the default machine with IP 192.168.99.100. Hopefully, this post helps other too busy (aka careless!) people like me!
Since both laptops have very similar apps installed, I doubt anything rather than the Docker app itself causes the difference in IP addresses.
Try the following commands:
run these two command
pip install --upgrade pip
pip install --upgrade jupyter
I'm just setting up docker on my Mac. The installation worked and I got some containers running (following the getting-stared guide), but now I want to connect with my browser to localhost, to show a web app.
For that I'm following this guide: https://docs.docker.com/engine/userguide/containers/usingdocker/
In the last section it is said, that you simple go with your browser to: localhost:XXXXX wheras XXXXX is the port, that you found out using the command
docker ps -l
First problem: here nothing happends. The browser is showing an empty page (ERR_CONNECTION_REFUSED)
Further more in the guide it is explained, that for Mac you can check your ip address via the command:
docker-machine ip your_vm_name
Here appears the second problem: This command results in an error-message:
Host does not exist: "your_vm_name"
So my questions are:
How to set up the virtual machine (or "your_vm_name" respectively)?
Does it have to do anything with the vhosts file on my Mac OS?
Is there mybe a conflict with MAMP (which I'm also using sometimes)?
Thanks in advance!
And thanks to GianArb for the very fast answer! That solution works as well.
Just to contribute to the community, I just found out by myself, that the solution was too simple to be true.
Instead of your-vm-name use default (obviously the default-host that is set up by docker), so I just used:
docker-machine ip default
and then I got the right IP.
Hello the process to start to use docker on mac with docker-machine is like:
Create a new docker machine on virtualbox, you can use a name like "your_vm_name" or just "default" in this way you can not use the name because "default" is a keyword that docker-machine try to use when you don't specify nothing.
The problem here is, why docker-machine ip your_vm_name doesn't provide the good ip? Can you copy the result of your command
echo $DOCKER_HOST
Usually it's 192.168.99.100
thanks a lot
Actual for Mac OS:
If there is no real need in VirtualBox machine you can just remove it.
Docker can start Linux containers under Mac OS without any VirtualBox machines.
Without any VirtualBox machines, all exported ports are available on the localhost:*.
Remove docker machine
docker-machine ls
docker-machine stop default
docker-machine rm default
Make sure that you don't have the command eval $(docker-machine env ...) in your ~/.bashrc or ~/.zshrc.
Otherwise, nothing will work. You will see the error Error: No machine name(s) specified and no "default" machine exists.
By the default configuration no need to have any env variables like $DOCKER_*
In my case, the only docker installed by downloading a .dmg image from the official site works without any problems. Any versions installed via brew didn't work out of the box.
PS: tested on Mac OS 10.13 and 10.14
I have been a Windows user all my life and I just got a Mac recently. With Windows (puTTY), I have "SSHed" into a local Ubuntu Server dozens of times in the past. I attempted to perform the same steps with my Mac, but I am not able to make any significant progress. Can anyone provide a guide as to how to SSH into a local Ubuntu Server?
I have a clean installation of Ubuntu Server running right now. Here is a picture of when I do "ifconfig":
The steps that I have done previously are as follows:
Install openSSH Server
In terminal, "ssh anish#localhost"
Connection is timed out or my password is not accepted.
Change it to bridged in ur VM settings in virtual box and use ssh anish#inet