Wednesday, October 21, 2015

upload file using sftp command in linux

Go to directory you want to upload file:

Now i want to copy from server ub15 file.tar.gz to server 10.82.1.4 at home root directory(/root

root@ub15:/media/Data#sftp root@10.82.1.4
The authenticity of host '10.82.1.4 (10.82.1.4)' can't be established.
RSA key fingerprint is 7a:8a:b4:da:d9:4d:84:5e:19:f9:aa:07:74:12:98:72.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '10.82.1.4' (RSA) to the list of known hosts.
root@10.82.1.4's password:
Connected to 10.82.1.4.
sftp> put redis-3.0.5.tar.gz 

Uploading redis-3.0.5.tar.gz to /root/redis-3.0.5.tar.gz
redis-3.0.5.tar.gz                                                  100% 1334KB 111.2KB/s   00:12   
sftp> quit