Opening browser in client machine through ssh - ssh

Using linux, this link explains how to open a browser in the remote machine using ssh:
https://superuser.com/questions/583608/opening-browser-in-remote-machine-through-ssh-closed
How can I do to see the remote machines browser on the client computer?
Sort of as with xclock...

Related

Why is MacOS Ventura preventing SSH logins?

I just got a Mac mini and have Ventura installed and I've enabled Remote Login for all users and full disk access (this is only for internal network access).
When I attempt to ssh to it (the Remote Login gui says to use "mac#192.168.68.74") from another mac I get:
kex_exchange_identification: Connection closed by remote host
Connection closed by 192.168.68.72 port 22
I've tested from the remote mac and confirmed that it does connect to port 22 and it attempts to pass in the ssh keys from my laptop system until it fails and disconnects.
I've created the id_ed25519 keys. I've added the pub version of the key from my laptop to the ~/.ssh/authorized_keys file in the admin accounts profile.
I would prefer to just enable password auth and skip the key nonsense, but I can't figure out how to do that.
Any ideas?

X11 forwarding: `xclock` works but not `cmake-gui`

I am connecting (ssh) to my host (Mac) from my client (Windows) machine. I have X11 forwarding active.
Now, running xclock on my host opens up the clock gui window on my client as expected, but running cmake-gui does not. I can see the application gui open up on my host (through teamviewer), but it isn't shown on my client.
I was able to make it work with WSL but somehow it's not working for my iMac as host.
I can provide more details if needed. Let me know how.

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

Connect to remote iPython notebook

I want to connect to existing notebooks via ssh tunnel / vpn on a remote linux machine.
I can not log in to the remote desktop viewing them,
but can generally log into another desktop session via Windows Remote Desktop (Win7, Linux with xrdp), so that I found the *.json files containing the ports (see similar questions 1, though I have no experience in finding the correct job/file).
After connecting a vpn and putty ssh tunnel (port A), I tried to access localhost:A by opening that in Firefox. Also I tried to run ipython notebook --existing kernel-B.json.
This did not work.
Do notebooks have to be on the tunneled port?
Or is there a way to connect (not start as in 2), or should I open a tunnel for every notebook port?
Similar questions:
Connecting to a remote IPython instance
Connect ipython-notebook via SSH tunnel from a remote location
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
Should I open a tunnel for every notebook port?
Yes!

VirtualBox, Remote Desktop, and VPN

Networking is not a strong skill set of mine and I'm new to VirtualBox..so here we go -
I've got a Windows (XP) VM running on VirtualBox. I am able to use remote desktop to connect to the VM with no problems.
The Problem: I need to connect to another network via VPN on the virtual machine. However, once connected, all local network resources become unavailable. As a result, my remote desktop session is disconnected.
Question: Is there another way to remotely access the VM? Is there some way that VirtualBox can route me to the VM without using the Windows RDC functionality so that I can have an active VPN connection but still control the VM remotely.
Should have done some more research. This feature is already built into VirtualBox. You can log into the VM through the host machine.
All you have to do is turn on remote display in the settings for the VM and choose the port that you want to use (make sure to make appropriate firewall changes). Then you remote to that port on the host machine.
Ex: Host machine has an IP of 192.168.1.200 and you set up port 3395 for the remote display - you would open Remote Desktop Connection and use 192.168.1.200:3395 and it would open the VM.
More detail from the VirtualBox site.
http://www.virtualbox.org/manual/ch07.html