Hey everyone,

I'm trying to use clj-ssh to copy stuff from my laptop to a remote machine
(on amazon ec2). I'm able to ssh and run simple commands from the REPL, but
the following command doesn't return (it's probably waiting for something)
nor does it create any data on the remote machine. I am able to run scp from
the unix shell and copy data to the /mnt directory. Here's what I'm trying,
I got here by modifying the example in the documentation slightly,

(ssh/with-ssh-agent []
>    (ssh/add-identity "/Users/nishant/.ssh/az-keypair.pem")
>    (ssh/scp-to (ssh/session "ec2-50-14-22-91.compute-1.amazonaws.com"
> :strict-host-key-checking :no :username "ec2-user")
> "/Users/nishant/home/work/solr/apache-solr-1.4.1/example/solr/data/index"
> "/mnt" :username "ec2-user" :recursive true))


The logs show the following,

INFO  clj-ssh.ssh - Connecting to ec2-50-14-22-91.compute-1.amazonaws.com port
22
INFO  clj-ssh.ssh - Connection established
INFO  clj-ssh.ssh - Remote version string: SSH-2.0-OpenSSH_5.3
INFO  clj-ssh.ssh - Local version string: SSH-2.0-JSCH-0.1.42
INFO  clj-ssh.ssh - CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
INFO  clj-ssh.ssh - SSH_MSG_KEXINIT sent
INFO  clj-ssh.ssh - SSH_MSG_KEXINIT received
INFO  clj-ssh.ssh - kex: server->client aes128-ctr hmac-md5 none
INFO  clj-ssh.ssh - kex: client->server aes128-ctr hmac-md5 none
INFO  clj-ssh.ssh - SSH_MSG_KEXDH_INIT sent
INFO  clj-ssh.ssh - expecting SSH_MSG_KEXDH_REPLY
INFO  clj-ssh.ssh - ssh_rsa_verify: signature true
WARN  clj-ssh.ssh - Permanently added '
ec2-50-14-22-91.compute-1.amazonaws.com' (RSA) to the list of known hosts.
INFO  clj-ssh.ssh - SSH_MSG_NEWKEYS sent
INFO  clj-ssh.ssh - SSH_MSG_NEWKEYS received
INFO  clj-ssh.ssh - SSH_MSG_SERVICE_REQUEST sent
INFO  clj-ssh.ssh - SSH_MSG_SERVICE_ACCEPT received
INFO  clj-ssh.ssh - Authentications that can continue:
publickey,keyboard-interactive,password
INFO  clj-ssh.ssh - Next authentication method: publickey
INFO  clj-ssh.ssh - Authentication succeeded (publickey).

Also when I replace "scp-to" with the "ssh" and try to get a directory
listing, it works okay. Has anyone here used clj-ssh for copying data?

Thanks!
Nishant

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to