08-19-2013, 02:19 PM | #1 |
Connoisseur
Posts: 56
Karma: 51304
Join Date: Sep 2012
Device: Kindle 4 NT,PW2
|
Ant Exec(scp) on Windows Os ?
I have Ant Script like this:
<exec command="scp -i ${dev.ssh.id} test.azw2 root@kindle:/mnt/us/documents/"/> But i am using windows os not linux, so it cant run this chunk under windows os. I think ant using command shell of default operating system and windows's cmd hasnt got scp support. i dont know what does it means dev.ssh.id on windows. |
08-19-2013, 02:29 PM | #2 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
|
|
08-19-2013, 02:34 PM | #3 | ||
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Quote:
|
||
08-19-2013, 03:15 PM | #4 | ||
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
For scp, see knc1's answer. Make sure to modify your %PATH% to include the path where scp resides, or - if you're lazy - just copy scp.exe to \windows or \windows32. Quote:
Finally, you will of course need an appropriate key file (man ssh-keygen), and the Kindle has to trust that key in its authorized_keys file. Example on Linux: Code:
ixtab@mbp:/tmp$ mkdir derya ixtab@mbp:/tmp$ cd derya/ ixtab@mbp:/tmp/derya$ ls -la total 68 drwxrwxr-x 2 ixtab ixtab 4096 Aug 19 20:54 . drwxrwxrwt 42 root root 61440 Aug 19 20:54 .. ixtab@mbp:/tmp/derya$ ssh-keygen -C "CaptainDerya's Kindle developer key" -f id_derya Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): (***press ENTER***) Enter same passphrase again: (***press ENTER again***) Your identification has been saved in id_derya. Your public key has been saved in id_derya.pub. The key fingerprint is: 9a:7a:2e:83:6e:3e:04:99:1d:c5:cd:68:d2:73:0f:28 CaptainDerya's Kindle developer key The key's randomart image is: +--[ RSA 2048]----+ | +.= | | E B = | | + = o o | |+ . . | | . S | | . o | | . . o | | + o.. | | +o..=. | +-----------------+ ixtab@mbp:/tmp/derya$ ls -la total 76 drwxrwxr-x 2 ixtab ixtab 4096 Aug 19 20:56 . drwxrwxrwt 42 root root 61440 Aug 19 20:54 .. -rw------- 1 ixtab ixtab 1675 Aug 19 20:56 id_derya -rw-r--r-- 1 ixtab ixtab 417 Aug 19 20:56 id_derya.pub ixtab@mbp:/tmp/derya$ cat id_derya.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDu/xUUW9vhF6spgd5nI8WmRxuXj/pM+fVgG+tK/CKrksbvhhX8QY4yLHvIpX5ufWYT6l5g8B+dYuCYzfCZC03Ry0AsS8fPBFMOdZcwaElBGAQ/K/GvKXUWJSNLcbiuYIXzNg1U7VMNvQNM/GHS9VsXztBwicqVOiQJpmQLq9PxWGm5hzZCqv6USQ9ZqNSSL9mkW5hkmHN7XJBt01Yvl4Jt7yxuERpRYeFJaE81xOxqKRYl3c2h0tqbqIbN73kBJmXAy0qj4+ZWKpRCnm4cSvsN2M6HsgRHrxiuYsCp1+GF8yJIwD++Bb6WOXmq+DbXxQ9Vcc3PQdxSG/N5oO4yVIz/ CaptainDerya's Kindle developer key ixtab@mbp:/tmp/derya$ scp id_derya.pub root@kindle:/mnt/us/usbnet/etc/authorized_keys Warning: Permanently added 'kindle,192.168.15.244' (RSA) to the list of known hosts. Welcome to Kindle! root@kindle's password: (***(any) password required, just press ENTER***) id_derya.pub 100% 417 0.4KB/s 00:00 ixtab@mbp:/tmp/derya$ ssh -i id_derya root@kindle 'echo "logged in without password"; whoami' Warning: Permanently added 'kindle,192.168.15.244' (RSA) to the list of known hosts. Welcome to Kindle! logged in without password root PS: (*) Well actually, the authorized_keys files has been overwritten to contain only that public key. But that's a detail. PPS: If anybody feels like this is useful enough as a short HOWTO to end up on the Wiki or index, feel free to link to it -- no, I'm not too lazy, I'm not sure if and where it fits. EDITED TO ADD: I also have this line in my /etc/hosts: 192.168.15.244 kindle which is why "root@kindle" works. Otherwise, use "root@192.168.15.244". And finally, a minor note: My .ssh/config looks like this: Code:
Host 192.168.15.244 StrictHostKeyChecking no UserKnownHostsFile /dev/null Host kindle StrictHostKeyChecking no UserKnownHostsFile /dev/null Last edited by ixtab; 08-19-2013 at 03:32 PM. |
||
08-19-2013, 03:32 PM | #5 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@ixtab: Linked in the USBNet doc, thanks .
|
08-19-2013, 03:37 PM | #6 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Well, it need not use the "... -i indentity-file ... root@kindle ..." parts of the command, that can all be included in a nickname (shortcut) entry in your ~/.ssh/config file.
The "HowTo" is to be found with the "filter by prefix" feature. Also, NiluJe's most recent USBnet can assign unique MAC addresses, based on the Kindle's serial number, to each end of the cable. Which in-turn allows your workstation's network automation identify the "Kindle of the Moment" and assign a unique set of IPv4 address (and a unique set of IPv6 address will be auto-configured by the normal IPv6 discovery process). Which in-turn can mean putting an end to the "I found a duplicate key" business. It also means (since IPv6 address are globally unique, without any NAT) my Kindle and "talk" to your Kindle (or twobobs, or ...). That "HowTo" is a WIP. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle ssh/scp with the USBnetwork package | knc1 | Kindle Developer's Corner | 13 | 02-13-2013 02:17 PM |
SSH/SCP -ing into the enTourage eDGe | AlPe | enTourage eDGe | 3 | 04-16-2012 05:04 PM |
Update Library After Scp Books Without reboot | qinbill | Kindle Developer's Corner | 15 | 11-08-2011 03:25 PM |
iLiad Need dbclient for scp... | grayfox | iRex Developer's Corner | 2 | 02-11-2008 02:40 PM |