Matlab connection to a remote server - matlab

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.

Related

VB Code - Multiple Remote SSH connections to same server

Is it possible to connect several users via openSSH to the same VM so that everyone can access VB Code on the same VM machine and run scripts? thrue the local VB Code
If so, how do I do this?

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

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?

How to run matlab m-file script on a linux server

I am new with using servers and currently, my PC has Windows 10 and Matlab 2016b. I have very long Matlab codes saved as m-files and when running these m-files on my PC, it takes a long time.
However, I can access our Linux server using Putty with a given ID and password. So, how I can run my Matlab codes on our server instead of on my local PC?
Assuming the Linux server has Matlab installed on it as well, (and that it has also been added to the path on the server), you can run your Matlab scripts from the terminal, simply by entering in the terminal, $ matlab your_script_name.m.
Also, there is the option to start Matlab on the remote server in command-line mode, by typing at the prompt $ matlab -nodesktop.
Finally, if you want to know a way on how to get your m-files from your PC to the remote Linux server, you can use a tool like winscp, which is often present in the company of putty.

Load a file from a remote machine in a local ipython notebook

I'm running IPython notebook on my local machine and I would like to load/save a file which resides on a remote machine via %load / %%writefile. Did anyone tried? Or is it possible? The remote machine is reachable via ssh.

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)