SCP Commands

Basic syntax of SCP
  • scp source_file_name username@destination_host:destination_folder

scp -p Label.pdf mrarianto@202.x.x.x:.

mrarianto@202.x.x.x's password:
Label.pdf 100% 3672KB 126.6KB/s 00:29

SCP commands :

scp -v : Prints debug information on the screen indicating what happens while copying. Unlike, scp command with no parameter copies the files in the background and does not display anything until an error is thrown while copying.

scp -v Label.pdf mrarianto@202.x.x.x:.

scp -p : The -p parameter displays an estimated time and the connection speed will appear on the screen.

scp -p Label.pdf mrarianto@202.x.x.x:.

Sample Output

mrarianto@202.x.x.x's password:

Label.pdf 100% 3672KB 126.6KB/s 00:29

scp -pv messages.log mrarianto@202.x.x.x:.

scp -Cpv messages.log mrarianto@202.x.x.x:.

Sample Output:

Executing: program /usr/bin/ssh host 202.x.x.x, user mrarianto, command scp -v -p -t .
OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 202.x.x.x [202.x.x.x] port 22.
debug1: Connection established.
debug1: identity file /home/pungki/.ssh/id_rsa type -1
debug1: Host '202.x.x.x' is known and matches the RSA host key.
debug1: Found key in /home/pungki/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: Next authentication method: publickey
debug1: Trying private key: /home/pungki/.ssh/id_rsa
debug1: Next authentication method: password
mrarianto@202.x.x.x's password:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
Authenticated to 202.x.x.x ([202.x.x.x]:22).
debug1: channel 0: new [client-session]
debug1: Sending command: scp -v -p -t .
File mtime 1323853868 atime 1380428748
Sending file timestamps: T1323853868 0 1380428748 0
Sink: T1323853868 0 1380428748 0
Sending file modes: C0600 97517300 messages.log
messages.log 100% 93MB 602.7KB/s 02:38
Transferred: sent 8905840, received 15768 bytes, in 162.5 seconds
Bytes per second: sent 54813.9, received 97.0
debug1: Exit status 0
debug1: compress outgoing: raw data 97571111, compressed 8806191, factor 0.09

debug1: compress incoming: raw data 7885, compressed 3821, factor 0.48

No comments:

Post a Comment