clj-commons/clj-ssh

No matching method found: put for class com.jcraft.jsch.ChannelSftp

cedw93 opened this issue · 1 comments

Hey this is my first time using this library, ive heard pretty good things about it.

I am trying to execute the following command:

(sftp "host" :put file "/" :username "user" :password "password" :port port_no)

but the following error gets thrown:

No matching method found: put for class com.jcraft.jsch.ChannelSftp

if i manually execute sftp from the command line and type the password all works as expected, however I can't figure out why this isn't working.

I am using version 0.5.11 hopefully its something trivial.

Realizing this is quite an old issue, but I encountered this as well so thought I'd leave an answer here so it's recorded. Probably what's going on above is that file is a java.io.File object. The sftp put call is looking for a string filename, not a File object.