Thursday, 12 November 2015

All about sftp

SFTP, (SSH File Transfer Protocol) is a protocol packaged with SSH that works in a similar way over a secure connection. The advantage is the ability to leverage a secure connection to transfer files and traverse the file system on both the local and remote system.

sftp performs all operations over an encrypted ssh session. It uses many of the features of ssh, such as public key authentication and data compression.





sftp can be primarily used in 4 ways 




Interactive session :In this mode, sftp connects and logs into the specified host, then enters its interactive command mode, where you type all your commands at a prompt. To launch an interactive session of sftp, use the following syntax:

sftp user@server.myhost.com


Automatic Retrieval Mode : We can use sftp to retrieve files automatically, without any promp


Batch Mode :  We can write sftp scripts to do ftp in batch mode and these scripts can be called by cron jobs .

Interactive Mode in Remote Directory : We can start start an interactive mode session in a specific remote directory. We can do this by specifying it on the command line sftp user@server:Dirname









No comments:

Post a comment