How do not display xterm terminal from remote server to local machine - remote-server

I run my code on remote server trough ssh and my code execute other scripts through xterm. Then the scripts are displayed on my local machine through xterm, but I don't want to display these on my local machine.
Is there any method that do not display these terminals on my local machine, even remote server actually run the scripts through xterm?

Related

Matlab connection to a remote server

Is there a way to connect to a host through matlab using SSH? The way that can be done in vscode for example.
I have script and data in the remote machine but matlab license in my local machine. I would like to run the matlab scripts using matlab installed on my laptop.
Alternatively, I clone the scripts on my laptop run them while processing the data located in the remote machine.
https://en.wikipedia.org/wiki/SSHFS
helps you mount a remote filesystem via ssh. So if you can login from your matlab laptop to the data pc via ssh , then sshfs is one step more. From there your data is a path on the matlab laptop.

Vscode Ssh Remote

I'm using vscode with the remote ssh plugin, I can connect normally, but I need that right after synchronizing with the server, a linux command is executed when opening a connection, that is, this command has to be executed, in fact it is a sudo, I need that it is already synced as root, thanks

How an output of Windows application executed on remote SSH server gets to a local SSH client

I'm using PuTTY to connect to an SSH server running on Windoes 7.
When I issue powershell in PuTTY terminal does it mean that the powershell command window opens on the remote machine?
If so how does the output from remotely running powershell window gets routed to PuTTY client?
Sorry if this is lame question but it's not so obvious to me.
While the PowerShell is executed on the remote machine, no window opens on the server.
powershell.exe is a console application. Console applications have a standard IO (input and output). If you run a Windows console application locally, Windows GUI creates a console window and binds the application IO to the window. While if you run a console application via an SSH server, the SSH server binds the application IO to the SSH shell session. So anything that the PowerShell prints, gets routed to the SSH shell session output, which ultimately renders in your local SSH client window (PuTTY).
In other words, a local PowerShell window is rendered by Windows GUI (the system that executes the PowerShell), not by the PowerShell process itself (contrary to windows of GUI applications). Another system, like the SSH server, can choose a completely different "rendering" of the IO, like routing the IO to the SSH shell session.
It's the same process like, if you use ls command on a *nix server. The ls is also a console application. (Afaik, all *nix applications are actually console applications, what is not true on Windows.)

Trigger jupyter notebook save

I have a jupyter notebook that I opened on a remote computer (with the kernel also running on that remote computer). I have also opened the notebook on my local computer (connecting to the remote kernel) but there have been changes to the notebook on the remote that haven't been saved.
Is there a way to trigger the remote computer to save the notebook, e.g., by sshing in and issuing some command?
It can be trigged by JavaScript.
IPython.notebook.save_notebook();

Use Jupyter Notebook on my local computer to run code on a remote computer

I use Jupyter Notebook to run bioinformatic analyses, and I love it. However, it only really plays nice when I run it on my personal computer. However, I regularly do analysis using a remote computer with multiple cores to reduce processing time. I'd like to be able to use the Jupyter Notebook interface on my personal computer while everything is actually running on the remote computer. I generally do this via ssh access to the remote computer within the shell and execute all commands at the command line. I'd love to do this from the Jupyter notebook on my personal computer, rather than from the shell on my personal computer. It is relevant that I don't have sudo access on the remote computer.
So far, I've installed miniconda and jupyter notebook on the remote computer like this:
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
Once conda is installed properly, I install jupyter notebook via miniconda with this line:
conda install jupyter
This installs successfully. I can then start a jupyter notebook session on the remote machine with the line:
jupyter notebook --no-browser
So far, so good. My next question: How do I have my local jupyter notebook connect to the remote machine, so that I can execute commands on the remote machine using my local jupyter notebook? There is some documentation here, however i have been trying different things for hours, but have failed to succeed.
Can anyone give a straight forward method to connect to my remote server, given that I am this far along? I feel like it should just be a matter of entering url addresses and passwords into my local Jupyter notebook (all of this is so easy via ssh in the shell).
Follow the steps below:
Enable port forwarding on remote machine
ssh -N -f -L 127.0.0.1:8898:127.0.0.1:8898 user#remote-machine.com
Do ssh to your remote machine and then run following command on remote machine
jupyter-notebook --no-browser --port=8898
you will see some thing as shown below
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8898/token=eaf2f51f9c053f43d8bd093e76f0cc6301b545549c998fa2&token=eaf2f51f9c053f43d8bd093e76f0cc6301b545549c998fa2
Copy and paste the URL in your local machine browser.
If you want to access Jupyter/Ipython notebook running on a VPS remotely, I wrote a tutorial on the digital ocean community site.
As shown in the guide, after installing and running Ipython Notebook using command line on the server, you can connect to the notebook using SSH tunnelling with Putty (on windows) or the ssh -L command on Unix-like systems (ie Mac and Linux)