Snippet:SSH from Matlab

From HUES Platform Wiki
Description You can SSH into Hypatia programmatically from within Matlab on your machine using this code:

http://www.mathworks.co.uk/matlabcentral/fileexchange/27999-ssh-from-matlab--updated--+-sftp-scp

Be careful, this could go badly wrong!

Author(s) Ralph Evins
Language Matlab
Tags Hypatia
Snippet code Add library: javaaddpath('C:\...\ganymed-ssh2-build250.jar')

Connect: sshfrommatlab('usr','hypatia.empa.emp-eaw.ch','my_password') Issue command: [conn, res] = sshfrommatlabissue(conn,'qstat -u usr') Send file: sftpfrommatlab() Get file: scptomatlab()

Notes