How to establish shh from Matlab (or how to start programm on remote computer by sending the matlab command on Windows)
58 ビュー (過去 30 日間)
古いコメントを表示
For my experiment I need to send the command from matlab (which is running on windows) to the linux (running on the remote computer).
The first idea was to use putty and to find the way how to send the command from matlab to putty. But I found no solution for this problem.
In matlab community I found ssh2 function which is looking useful. But if I put in the command window
- ssh2_simple_command('username@name_of_pc','username',passwort','ls -la *ninjas*')
I receive an error “SSH2 could not connect to the ssh2 host - ‘username@name_of_pc'.
I would be very grateful if you could give me an advice, how to solve this problem.
Many thanks in advance
回答 (1 件)
Rashed Mohammed
2021 年 3 月 8 日
Hi Inna,
It seems that remote computer is not accessible from your computer. I've tried the command you've mentioned and it worked perfectly fine for me. Please verify whether remote computer is accessible from your computer or not using the command "ping <remote_computer_hostname>". If the previous command doesn't give error, then try SSH'ing using other software such as Putty to check if it is a problem with MATLAB only.
Hope this helps
2 件のコメント
Rashed Mohammed
2021 年 3 月 8 日
Thanks for getting back. I have looked at the File Exchange submission's comments section and it seems that others have had a similar issue. One user has posted a workaround which worked for him. Please try the mentioned workaround. If the issue still persists, feel free to contact the author of the submission directly.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!