Wednesday, 15 August 2012

Connect using SFTP and transfer files


How to connect to SFTP?


Sftp is Simple File Transfer protocol which comes very handy in all of BI projects. The following steps are followed to Copy and Paste files.

Copy files to a Directory:

$ sftp
lscpxx3@35.101.11.50

Connecting to 35.101.11.50...
sftp> mput ALL_DWH_v1.1.tar /wload/lscp/home/lscpxx3
Uploading ALL_DWH_v1.1.tar to /wload/lscp/home/lscpxx3/ALL_DWH_v1.1.tar
ALL_DWH_v1.1.tar 100% 2130KB 152.1KB/s 00:14
sftp> exit

Paste files to the other server:

Now Connect to the other server:
/wload/wzad/home/albatuat>sftp lscpxx3@35.101.11.50
Connecting to 35.101.11.50...
sftp> mget /wload/lscp/home/lscpxx3/ALL_DWH_v1.1.tar /wload/wzad/app/subwload/ALL_DWH
Fetching /wload/lscp/home/lscpxx3/ALL_DWH_v1.1.tar to /wload/wzad/app/subwload/ALL_DWH/ALL_DWH_v1.1.tar
/wload/lscp/home/lscpxx3/ALL_DWH_v1.1.tar 100% 2130KB 142.0KB/s 00:15
sftp> exit

This will help you to copy files to and fro across DEV, Test and Production UNIX boxes.

No comments:

Post a Comment

Please share your thoughts and let us know the topics you want covered