Code covered by the BSD License  

Highlights from
SSH/SFTP/SCP For Matlab (v2)

5.0

5.0 | 4 ratings Rate this file 48 Downloads (last 30 days) File Size: 757 KB File ID: #35409
image thumbnail

SSH/SFTP/SCP For Matlab (v2)

by David Freedman

 

01 Mar 2012 (Updated 03 Jan 2013)

Improved Matlab interface for SSH2/SFTP/SCP (supports public key) using the Ganymed-SSH2 javalib.

| Watch this File

File Information
Description

A new Matlab interface for using the Ganymed-SS2 Java library. Renamed commands are improved for limitations of existing Matlab/SSH2 codebase (see inspired submissions) using a straightforward command list.

If you need to access a remote machine from your Matlab session (for near-real time data transfer etc...) this set of functions allows you to send commands and obtain the return values. SFTP and SCP file transfer functions are included. Supports public key authentication and improved multiple command support.

This requires the open-source Ganymed SSH-2 for Java that is freely available and automatically downloaded on first use. For SFTP-GET, one must modify the ssh2_setup.m to use the included custom Ganymed SSH-2 Java library that is compatible with Matlab. Otherwise, the official Ganymed library will be downloaded automatically on first use.

See ssh2-examples.m for documentation.

FOR SUPPORT, PLEASE CONTACT AUTHOR DIRECTLY instead of posting to "Comments and Ratings" first. Helpful information or comments can be posted after communication to ensure useful information for others instead of a ballooning of failed SSH/SFTP/SCP connection info in the comments.

Additionally, I would love to hear about how and where you're using this submission in the comments section.

Acknowledgements

Ssh From Matlab (Updated) + Sftp/Scp and Ssh, Sftp/Scp From Matlab With Public Key Authentication inspired this file.

MATLAB release MATLAB 7.9 (R2009b)
Other requirements Ganymed SSH-2 for Java library http://www.cleondris.ch/opensource/ssh2/ (will be automatically downloaded if needed) OR Enable the included custom Ganymed SSH-2 library if SFTP-GET functionality is needed (see ssh2_setup.m for more info)
Tags for This File  
Everyone's Tags
communications, ganymed, network, remote, remote control, scp, sftp, ssh, ssh2
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
13 Mar 2013 Alberto

Very nice package. I was looking for this las couple of years. Now I am able to copy the data files from remote servers and analyze then automatically into matlab. Very nice!!!! Thanks a lot.

07 Jan 2013 Roberto Sassi

Very good package. After the last modifications, it also deals smoothly with sftp only servers. I highly appreciated the support of David Freedman
and its commitment at improving the software.

26 Dec 2012 Nathan Tomlin

Wow, works perfectly! I'm using matlab to design masks for lithography. Now I don't have to constantly upload the files manually!

11 Jul 2012 David Freedman

Thanks Jon, Nitay, and Danilo. I've updated the files to include Danilo's fix.

10 Jul 2012 Jon Douglass

Nitay and Danilo are correct. I just upgraded to R2012a and now my previous fix doesn't work whereas it did on R2008b.

Danilo's fix should work for all cases...

19 Apr 2012 Danilo Horta  
19 Apr 2012 Danilo Horta

"for jcp_index = 1:size(jcp,2)" does not work here. Just replace by "for jcp_index = 1:length(jcp)". Problem solved.

18 Apr 2012 Nitay Megides

I'm sorry but this fix caused the config function to miss finding the jar file in the jcp (Maybe it's a matlab version issue?)

03 Apr 2012 Jon Douglass

One of the functions in this package has an error:
ssh2_setup.m
line 217:
for jcp_index = 1:size(jcp,1)

should be:
for jcp_index = 1:size(jcp,2)

Updates
04 Apr 2012

Bug fix that Jon Douglass identified. correct check for java library being loaded.

11 Jul 2012

Made change to ssh2_config.m to account for Matlab's array size version dependence of the dynamic java classpath.

03 Jan 2013

Created a custom Ganymed SSH-2 Java library (now included in attachment) that is compatible with the way Matlab handles Java byte arrays. This is needed to support SFTP-GET functionality. Default behavior still uses official Ganymed library.

Contact us