SFTP [Secure File Transfer Protocol]
Introduction
SFTP is a solution to many problems. Imagine the situation where you are struck with security issues between two different operating systems. For an instance: — A device running on Linux has some files that you want transferred in windows without any intrusion of anyone else. Here comes the role of SSH, where one can connect to a host having an IP Address, authenticated with a password. How does that sound?!
Description
The client, like any other ordinary clients initiate the connection and request the data from the server.
In SFTP, the server first authenticate the client and then allow it to access the server system. The authentication is a login session that asks for the username of the host and the password.
The SFTP client, willing to connect to the server should know the path required to route the transmission beforehand.
Unlike SCP [Secure copy protocol], SFTP provides a system management functionality that caters to the processes which are prone to get interrupted in between. Processes such as resuming interrupted file transfer, deleting the files on a remote system, listing the content of a remote directory and much more.
There are dedicated SFTP softwares for different operating systems. In Linux one doesn’t need to install a software in order to use SFTP, instead the shell terminal of Linux allows you to connect to a host via SSH.
The users of windows can access SFTP without a shell terminal. There are many softwares meant for the purpose. One such is Putty, which allows a user to connect to a host, opening SSH port [port-22] for the users.
There are two ways one can use SFTP: -
1. Graphical SFTP clients: — It is a GUI-based SFTP client that enhances a user’s experience of transferring files from a remote system. It provides a drag and drop feature that literally makes the life easier for the users. The directories of a file system are represented by icons, and every window represents a file’s system.
2. Command-line FTP: — Command-line FTP, are more favourable to the developers who intend to access the shell of an operating system. Unix and Mac OS X based systems provide this feature to the users.
sftp username@host
The aforementioned is used to connect to a remote host via SFTP. It then demands a password for the security purpose and Eureka!! You are accessing a whole other file system, sitting at your home, capable of transferring the files between the two.
Some conventional sftp commands are :-
cd — To change the directory of a file system
mkdir — Making a new directory in the remote file system
chmod — Changing the file permissions of a remote system
chown — Change the owner of files on a remote system
The most wonderful feature of SFTP that has been explored in the article is the secure transmission that it offers. Although security and authentication is not present in SFTP itself, instead SSH is the underlying layer providing security to the SFTP.
Also it cannot be safely deduced that SFTP is FTP running over SSH. It is due to the fact that there are umpteen layers of SSH that are used in the security of the protocol. SFTP is a whole new protocol combining SSH and FTP, designed by IETF SECSH working group.
References
Posted by http://hostingrecipe.com/