Using matlab from local computer to connect and transfer files to remote computer
Hello all,
I am trying to write a script to login to a remote computer, transfer the local files, and run some programs on the remote computer. I am using a linux system and I am able to login to the remote computer (also linux) using the unix(‘ssh -Y username@hostname’) matlab command, but once I login, the commands written in the editor after this do not execute. For example, I would like to execute the print working directory (pwd) command after logging in to the remote computer.
Script I have written in the editor for the login and pwd command:
unix(‘ssh -Y username@hostname’);
unix(‘pwd’);
What the matlab command window shows me:
>> script
username@hostname’s Password: *enter password in command window*
username@hostname-login2:~>
Now the unix(‘pwd’) command does not seem to execute in the username@hostname-login2:~>
To execute the pwd command, I would have to go to the command window and type it. My question is how do I write the script in the matlab editor so that the pwd command is executed from the editor itself when running the script?
Let me know if you need additional details. Thanks in advance for your help.
Regards,
SouHello all,
I am trying to write a script to login to a remote computer, transfer the local files, and run some programs on the remote computer. I am using a linux system and I am able to login to the remote computer (also linux) using the unix(‘ssh -Y username@hostname’) matlab command, but once I login, the commands written in the editor after this do not execute. For example, I would like to execute the print working directory (pwd) command after logging in to the remote computer.
Script I have written in the editor for the login and pwd command:
unix(‘ssh -Y username@hostname’);
unix(‘pwd’);
What the matlab command window shows me:
>> script
username@hostname’s Password: *enter password in command window*
username@hostname-login2:~>
Now the unix(‘pwd’) command does not seem to execute in the username@hostname-login2:~>
To execute the pwd command, I would have to go to the command window and type it. My question is how do I write the script in the matlab editor so that the pwd command is executed from the editor itself when running the script?
Let me know if you need additional details. Thanks in advance for your help.
Regards,
Sou Hello all,
I am trying to write a script to login to a remote computer, transfer the local files, and run some programs on the remote computer. I am using a linux system and I am able to login to the remote computer (also linux) using the unix(‘ssh -Y username@hostname’) matlab command, but once I login, the commands written in the editor after this do not execute. For example, I would like to execute the print working directory (pwd) command after logging in to the remote computer.
Script I have written in the editor for the login and pwd command:
unix(‘ssh -Y username@hostname’);
unix(‘pwd’);
What the matlab command window shows me:
>> script
username@hostname’s Password: *enter password in command window*
username@hostname-login2:~>
Now the unix(‘pwd’) command does not seem to execute in the username@hostname-login2:~>
To execute the pwd command, I would have to go to the command window and type it. My question is how do I write the script in the matlab editor so that the pwd command is executed from the editor itself when running the script?
Let me know if you need additional details. Thanks in advance for your help.
Regards,
Sou ssh remote login, unix command MATLAB Answers — New Questions