[Date Index] [Thread Index] [Author Index]
Re: Import remote files via scp?
Eugene Kirpichov wrote: > Does Mathematica support opening files via scp or sftp? > Or is there a separate package around to do that? > Or is it possible to write one, using only the Mathematica API without > foreign functions? > > (Otherwise, seems like I'll have to J/Link with the jsch library and > post my results here) > Import can read from pipes. Assuming that you use public key authentication (and thus do not need to type a password), the following *should* work on a Unix system, but I have not tested it: Import["!ssh remote-machine cat path/to/your/file", "Table"] (It is important to explicitly specify the data type, e.g. "Table", when Import is reading from a pipe.)