Tuesday, November 23, 2010

SSH file transfer

[1] http://www.go2linux.org/scp-linux-command-line-copy-files-over-ssh
[2] http://en.kioskea.net/faq/794-file-transfer-via-ssh
[3] http://www.terminally-incoherent.com/blog/2006/09/23/command-line-scp-for-windows/

[1]
---------------------
Usage
scp [[user@]from-host:]source-file [[user@]to-host:][destination-file]

scp -r miguel@10.1.2.2:/home/miguel/ miguel@10.1.2.3:/home/miguel/

[q.yang@localhost user]$ scp q.yang@10.10.20.70:/home/q.yang/lpc3250/ltib-GsnComms3240/rootfs/home/user/TcpIpCommsTarget root@10.10.20.89:/home/user/
The authenticity of host '10.10.20.70 (10.10.20.70)' can't be established.
RSA key fingerprint is 1b:19:f1:da:bd:28:f7:ac:15:fc:d8:28:62:58:47:8b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.10.20.70' (RSA) to the list of known hosts.
q.yang@10.10.20.70's password:
Permission denied, please try again.
q.yang@10.10.20.70's password:
The authenticity of host '10.10.20.89 (10.10.20.89)' can't be established.
RSA key fingerprint is 9a:5b:48:d3:8c:aa:4f:19:6b:fe:5d:9c:bd:64:72:16.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.10.20.89' (RSA) to the list of known hosts.
root@10.10.20.89's password:
TcpIpCommsTarget 100% 11KB 11.0KB/s 00:00
Connection to 10.10.20.70 closed.



[3] PSCP SCP client under windows
------------------------------------
You can download pscp.exe from Putty download page. Works under windows command line.
See screen shot:

Microsoft Windows XP [Version 5.1.2600]

D:\MyDocXp\Downloads>pscp U:\Quentin\Zone__Release\Release-CommsModule\Current\A
pp\GsnCommsTask_20110214 root@172.16.18.2:/home/user/
root@172.16.18.2's password:
GsnCommsTask_20110214 | 318 kB | 318.8 kB/s | ETA: 00:00:00 | 100%

D:\MyDocXp\Downloads>

See screen shot:






[2]
-----------------------------------
ssh server "cat remote_file" > local_file
ssh server "gzip -c remote_file" > local_file.gz
ssh server "gzip -c remote_file " |gunzip > local_file

* Linux/Unix
o Most Unix/Linux versions are supplied as standard with an ssh client, and most with an ssh server.
* Under Windows
* Free ssh client:
o Putty
* Free graphical scp/sftp client :
o WinSCP
o FileZilla
* Free SSH server:
* For Windows 2000/XP:
o ssh Windows (can be operate as a service)
* For Windows 95/98/ME/2000/XP:
o Use Cygwin

No comments: