JSch can be found here. It is also in clojars and can be added to your project (if using leiningen) like this: (defproject example_project "0.0.1" :description "Example" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [com.jcraft/jsch "0.1.42"]])
requires leiningen lein clean && lein deps && lein compile && lein jar
(with-connection [opts & body])
(with-connection
{:user "foo"
:keyfile "/path/to/my/keyfile"
:host "my.sftp.host.example.com"}
(cd "somewhere")
(grab "aFile.txt"))
(with-connection
{:user "foo"
:keyfile "/path/to/my/keyfile"
:passphrase "opensesame"
:host "my.sftp.host.example.com"}
(cd "somewhere")
(grab "aFile.txt"))
(with-connection
{:user "foo"
:password "bar"
:host "my.sftp.host.example.com"}
(cd "somewhere")
(grab "aFile.txt"))
- user
- password
- keyfile
- passphrase
- host
- port (default 22)