Introduction to SSH (Security shell)

Source: Internet
Author: User
Keywords SSH remote host secure login
Tags access address aliyun channel connect copy directory example

OpenSSH can provide secure http://www.aliyun.com/zixun/aggregation/6587.html "> Remote access, support command session, X11 forwarding (X forwarding), SCP and secure FTP file transfer. Also, port forwarding can be used to establish an encrypted channel for other protocols.

SSH can replace traditional telnet,rlogin,ftp. Because passwords are passed in plaintext in these protocols, this means that passwords are easily intercepted, and SSH solves these problems with encryption, providing a secure remote access scenario. It supports command session, X11 forwarding (X forwarding), SCP, and secure FTP file transfer. Also, port forwarding can be used to establish an encrypted channel for other protocols.

Installing the SSH server side

If you want to securely connect to a remote host (log in with putty under Windows), you need to install an SSH server for it. Ubuntu uses the Openssh-server to do the service side, the need installs the package is openssh-server.

Remote file transfer via SSH

Linux Graphics Interface operation

Nautilus can be used to SSH login to the remote host to browse and transfer files. Click "Location (16882.html" >places) "->" Connect to the server (connect to server), "service type" select "SSH", on "server" The name and IP address of the remote host are filled out in the column, and you can also set a nickname for your login account by filling in the login name at user name.

After you log in, you can copy files between the different end windows by dragging and dropping.

Graphical interface operations under Windows

File transfer with WINSCP SSH server that logs on to Linux under Windows, which can be downloaded for free at [1].

Using Command line actions

Use the SCP command to securely replicate files between local and remote hosts as follows:

SCP <file> <USERNAME>@<IP address or hostname>:<destinationdirectory>

For example, to copy a file from a local host to a remote host, run:

SCP file.txt Joe@192.168.1.103:/home/joe

Another example:

SCP "New Document.odw" Joe@laptop: "/home/joe/summer 2005"

To use this command, you must include a local file name, remote host name, remote host IP address (or domain name), and three parts of the remote directory to which you want to replicate. To copy files from a remote host to a local host, run:

SCP Hornbeck@192.168.1.103:/home/hornbeck/otherfile.txt.

'.' Indicates that the file is copied to the current directory, or you can rename the copied file with a different filename, such as ' My.txt '.

The two most commonly used parameters of the SCP command are '-R ' and ' C ', where '-R ' means recursively replicating the entire tree, '-C ' for compression, which speeds up file transfer, which is also valid in SSH and SFTP commands.

Note: You cannot copy files between two remote hosts, copy files locally, or copy files to local.

In the SCP command, if the local and remote hosts are the same host, then only the hostname (@xxx can be omitted), and if the remote host directory is omitted, the operation is performed under the user's home directory. For example:

SCP 192.168.1.103:file.txt.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.