How to establish shh from Matlab (or how to start programm on remote computer by sending the matlab command on Windows)
73 次查看(过去 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!