Contents
- SSH Tutorial
SSH Tutorial
SSH, the term derived from Secure Shell, provides users with a secure, encrypted mechanism to for accessing systems that are supporting remote connections through the ssh services and do the various jobs from maintenance of Unix/Linux systems to the plain files transfers as it can be used as a secure replacement for FTP as well.
Unlike the formerly used telnet sessions, the SSH is the perfect solution for accessing remote systems as the session established through the ssh services is encrypted and non vulnerable to malicious attack like eavesdropping for passwords or sensitive information, hijacking messages to inspect and modify transmitted data and faking network addresses to fool access control mechanisms or redirect connections to a fake server.
Because of the ssh sessions security the package with SSH services are therefore applied to the ftp services as well.
SSH Services Unix/Linux OS
Under the Unix/Linux OS compatible systems the ssh services are included by default and does not require any additional installation although there are packages named OpenSSL and OpenSSH that can be installed additionally.
Server side requirements
At the Unix/Linux OS based system the SSH services are already installed and ready for usage. The ssh configuration file is located at /etc/ssh/sshd.config and is used for any additional configurations regarding listening port, location of keys exchanging between the two sessions of the client and server and vice versa etc.
Existing ssh configuration is ready for use from the ssh server so the starting the ssh services will provide instant accessibility to the server where the service is running.
The configuration is well documented within the configuration file itself providing most comprehensive way of understanding of the server's options enabled or disabled from within the configuration file.
If the configuration file is updated/altered or changed the ssh server has to be restarted so the new settings can be activated.
SCP services
Although the scp and sftp clients are installed within any distribution of the Unix/Linux OS system and comes along with the ssh services package the usage is separated at two sections : one is the plan usage from the shell prompt and other ones are GUI based softwares which are additional and relays to the stated services above and are purely an graphical fronted.
The SCP services usage from the shell prompt requires from user to know the exact destination where the transferred file would be placed at the remote side. The SCP are not bidirectional and the transfer is available only in one way per session.
Let's say that we have Client and Server Unix/Linux OS based systems with user account created at the Server side for accessing the folder named Test_Server where the files would be placed after the transfer.
Also we're presume that at the Server side domain name is test.com and that there is the folder named Test_Client and at the client side that there is a file named test.txt within the folder Test_Client.
Example Client to Server
At the Client side's shell prompt:
$ scp test.txt test.com:/Test_Server/
With our VPS hosting plan you will gain full root access with SSH and SCP utilities available at your service. Wonderful support follows.
Example Server to Client
If the the file was transfered successfully to the destination server using the example above we'll do at the Client's side shell prompt:
$ scp test.com:/Test_Server/test.txt ./
The username and password combination will be again required in order to initiate the transfer of the test.txt from Server side to the current folder of at the Client side.
SFTP services
In order to use the file transfer protocol through the secure connection Unix/Linux users can use almost any web browser which support fish:// protocol (like Konqueror that any distribution contains by default).
At the location section the fish://SERVER_NAME should be stated. When the successful connection is established the username and password will be required.
Once the correct username and password combination is stated the file system from the remote site will be displayed within the browser's window.
The well known gFTP also supports the secure connection for the ftp services and the using is the same as it's for the plain ftp services with one exception – it provides secure connection which relies again on the default Unix/Linux ssh services.