Unable to start X11 through ssh using Putty - ssh

Currently trying to setup the mininet virtual machine. I did all according to the instructions. Before proceeding following is my setup details.
My host platform - Windows 8.1
My guest OS : Ubuntu 14.04, 32-bit with mininet. I downloaded the
ovf this one - mininet-2.2.0-141209-ubuntu-14.04-server-i386. Running on VirtualBox
I installed the required packages on the mininet-ubuntu-server (xserver-xorg-core,xserver-xorg,xorg,xorg openbox,ubuntu-desktop). One package fxlrg, I could not install as it was saying "unable to locate package"
Then I used the command "startx" on virtualbox console, it started the ubuntu desktop but very slow and with poping up 4 to 5 errors.
I have already setup the network for host-only adapter, I am able to ping from host machine to guest machine, I am able to ssh from host machine to guest machine using PuTTy. I am able to login with no problems.
But I don't know to see the x11 window from PuTTy. I have already enabled the X11 forwarding on PuTTy and I have already installed the Xming on windows. Please suggest how to debug and how to fix this. I have no idea how to proceed now.

You may need to enable X11 SSH Forwarding in the /etc/ssh/ssh_config file.

Related

Remote access to a Jetson Nano

I am trying to remotely access a Jetson Nano from my mac. So far I have done the following:
I installed microsoft Remote Desktop on my mac
I connected the nano with my mac through the Micro-usb Port
In network I could see the connection "linux for Tegra" where my nano would be 192.168.55.1
With this I still cannot remote access the nano
So I open a terminal and typed
>ssh username#192.168.55.1
and I could access the nano terminal.
So I think now, I have to do
>sudo apt install xrdp
in order to be able to remotely access the GUI.
However, the nano does not have internet connection.
Is there a way that it can use the internet connection of my mac to do this?
(I am reading a tutorial on Rasppi with windows and apparently this is possible)
One of the approaches is to install X server for mac and then use ssh -Y username#192.168.55.1. You will get the command line shell first but you can type in commands like gedit - they windows will show up on the host.
192.168.55.1 is the same network as any other. All tools supposed to work over TCP/IP should work with it as well.
USB is a Serial connection by default.
On windows use a putty based tool.
For example start with MobaXterm > New session > Serial #11500
Login
Password
It won't forward internet by default.
Best simple way is to plug in your phone as USB network sharing and plug in to the laptop via micro-USB.
For Linux, Ubuntu, use a serial ("COM" related stuff) tool.
If you want to do ssh through USB it will require custom editing of networking file.
By default Nano is using a bridge called L4TBRO on 192.168.55.1, laptop is client in .100.
DNS server is on Nano's side.
You would have to create a new interface but using your laptop as DCHP and DNS servers.
Note that usb can power the Jetson Nano for continuous execution on a recent laptop. Some recommends not to and it may crash if you run a compilation on all cores. (if it crashes, just disable 2 cores via nvpmodel -m 1)

Remote access Jupyter notebook from Windows

I usually access Jupyter notebook running on Linux from Mac OS X via port forwarding like following:
https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh
Is it possible to do similar thing from Windows 10 instead of Mac OS? I guess putty or WSL offer one.
https://www.akadia.com/services/ssh_putty.html
https://superuser.com/questions/1119946/windows-subsystem-for-linux-ssh-port-forwarding
You can create an SSH tunnel to connect to the Jupyter Notebook or Jupyter Lab web interface using PUTTY on windows.
Download the latest version of PUTTY
Open PUTTY and enter the server URL or IP address as the hostname
Now, go to SSH on the bottom of the left pane to expand the menu and then click on Tunnels
Enter the port number which you want to use to access Jupyter on your local machine. Choose 8000 or greater (i.e. 8001, 8002, etc.) to avoid ports used by other services, and set the destination as localhost:8888 where :8888 is the number of the port that Jupyter Notebook is running on. Now click the Add button, and the ports should appear in the Forwarded ports list.
Click the Open button to connect to the server via SSH and tunnel to the desired ports.
In the PUTTY terminal, run Jupyter, where the default port is 8888
jupyter lab --no-browser or jupyter-notebook --no-browser
Copy the server path into the browser on your local system and navigate to the notebook
http://localhost:8888/lab?token=... or http://127.0.0.1:8888/lab?token=...
Note:
If running remotely to your employer, a VPN connection will probably be required.
As an addendum to this answer, this screenshot shows how putty config looks like:
On the Linux machine, I then start Jupyter with:
jupyter notebook --no-browser --port=8889
Finally, on the windows (or any remote machine) I enter localhost:8888 in the browser.
It asks for the token, that is provided at the shell of the Linux machine.
--
Note which port refers to which machine, I have the notebook on port 8889, the browser calls it at localhost:8888
I solved this problem by myself. My solution is using Windows Subsystem for Linux (WSL). This offers (virtual?) Linux console like Ubuntu. I just use ssh with -L option on it.
Follow the steps below.
step1- Download putty.
step2- Insert ip address or hostname.
step3- Go to SSH and expand.
step4- Add address of jupyter-notebook to destination column ex: localhost:6666. Add local port such as 8000 to source and press add button. Then connect, it should work.
I wanted to use the VPN Server feature of my cable box to enable remoting into my network, especially to run jupyter notebook. For my situation, probably not quite the same as anyone elses, this works fine.
On the cable box, be sure to enable the VPN Server and enable external access.
On the remote Windows 10 computer, add a PPTP VPN specifying cable box's external IP. Connect to the VPN. Verify you can access the network. e.g. You should be able to see the cable box's webpage.
On the Jupyter serving computer, in Windows Defender Firewall, you need to create a new Inbound Rule for a Port.
3.1. General-> Enabled, Allow the connection
3.2. Protocols and Ports-> TCP, 8888
3.3. Scope-> Private
On the Jupyter serving computer, invoke Jupyter (e.g 192.168.0.1, port 8888):
jupyter-notebook --ip 192.168.0.1 --port 8888 --no-browser
On the remote computer, you should now be able to access your Jupyter server by browsing to http://192.168.0.8:8888/tree

Need to install Firefox browser on Hortonworks Sandbox virtual machine (HDP 2.4) running in Virtual Box 5.0.16

I am new to Hadoop and the Big Data world...
I have installed the Hortonworks Sandbox VM in Virtual Box. It's working great...
Can someone tell me how to install Firefox within the VM? I need it to use NIFI
Thanks a lot for any help!
Installing a browser on the VM and using it through VNC will typically be very slow. The best option is to set up an SSH Tunnel and do a local forward. If you use the PuTTy ssh client on windows then you can follow the following instructions on setting up the local forward which will allow you to use your browser on the host operating system to connect to the NIFI instance running in your VM.

How can I open the desktop GUI on my virtual machine in Bluemix?

I am running a virtual machine in Bluemix and want to open the OS's desktop GUI. How do I do this? Thanks for your help.
I've edited your question to what I think you're asking: How can I open the desktop GUI on my virtual machine in Bluemix?
Assuming I understand the question correctly:
To open the desktop GUI on a remote virtual machine, use Virtual Network Computing (VNC). This solution is not specific to Bluemix; it'll work with a VM running on any platform, as long as the VM is running an OS that supports VNC.
To use VNC, you need to have a VNC server running in your VM's OS. You will then run a VNC client (a.k.a. viewer) on your computer to display the VM's desktop. The specific instructions depend on the OS running in the VM and on your computer.
For example, assuming your VM is running Ubuntu v14.04, these resources explain what to do (and a search will find other resources):
"How to Install and Configure VNC on Ubuntu 14.04" -- Installs XFCE4 as the VNC server
"How To Install And Configure VNC On Ubuntu 14.04" -- Also installs XFCE4.
"How to Install VNC Server on Ubuntu 14.04 LTS" -- Installs TightVNC as the VNC server
For a VNC client, I actually connect to remote VMs via a local VM running Ubutu 14.04, so I use Vinagre (a.k.a. the Remote Desktop Viewer app). Options listed by other authors include TightVNC, RealVNC, or UltraVNC.
Good luck and thanks for using Bluemix.
From what I understand, you need some remote desktop tool to get to the UI of the OS of your virtual machine. Some tools available: http://www.techradar.com/us/news/software/applications/7-of-the-best-linux-remote-desktop-clients-716346

Ubuntu on VirtualBox and Rails server

I have Windows 7. Installed VirtualBox and Ubuntu 11.04 as guest OS.
Networking is done by NAT.
Everything is fine: I have internet on Ubuntu.
I can access Windows from Ubuntu by its ip.
But i can't access Ubuntu by it's ip which is shown by ifconfig.
I run rails on Ubuntu.
How can I solve this problem: connect to Ubuntu/Rails server on ort 3000 from my Windows?
By default, VirtualBox's NAT allows the virtual machine to access the Internet ; but doesn't allow the physical machine to access the Virtual one.
The simplest solution would be to use another networking setting than NAT, for your Virtual Machine -- for instance, bridge should work fine (your VM would be visible on your network, though).
Another solution would be to use port forwarding ; about that, this article might help : Howto Access via ssh a Virtualbox Guest machine.
I used to struggle with configuring a similar setup until I found Vagrant. Vagrant makes it very simple to setup, connect to and work with a Linux virtual machine. After Vagrant is configured you can just type vagrant ssh to enter the virtual machine and your account has automatic sudo rights and everything works as expected - you don't even have to deal with logging into the vm. The initial setup for ssh does look to be a little more work under Windows though as you need to configure Putty before you can connect.
There is a simple configuration file in Vagrant that you use to specify which ports from the VM you want forwarded to your machine using a syntax like:
config.vm.forward_port("rails", 80, 3000)
config.vm.forward_port("tomcat", 8000, 8080)
and everything is taken care of. Details are here
If, for example, you are using Rails and you start vagrant with the command vagrant up in your Rails project directory than that directory is available on the VM. Since it is the same shared directory between machines, any changes you make in your Rails project directory on your machine using your regular editor is seen on the VM also. This makes testing in other environments very easy.
Instructions for setting Vagrant up with Windows are here and a RailsCast about it is here. Note that Vagrant has nothing to do directly with Rails - you can use it for setup of any virtual machine environment you need.
In short, you can't.
It is a local host not a public domain therefore not publicly accessible outside of your virtualbox environment.
Maybe someone has a clever hack for this but why would you want to do this in the first place?
Your solution is to either use firefox to browse to your localhost within your virtualbox linux session or develop on windows.
Personally I work the other way round I run Ubuntu 11.04 and I have virtualbox installations of xp, 2,000, me, vista and 7 so I can test in different environments. Inevitably I end up sharing my project folder from Ubuntu so that I can run the project in whatever OS I am testing for.