Linux SSH Transfer File __linux

Source: Internet
Author: User
Network Connection Program SSHPowering Linux




What is SSH

   SSH(Secure Shell) is a secure network connection program, it allows you to connect to other computers on the Internet, execute programs on other computers, copy files between computers, and it can even provide you with a more secure x connection, all of which are done under coded protection. That is to say, install SSHThen you can turn off the unsafe telnet and FTP.


Why to use SSH

The functions mentioned above, the early BSD supplied R instructions (rsh, rlogin, RCP) are almost complete, so why use SSH? The reason is that the connection provided by the R directive is not encoded, and a conscientious person can intercept every word you enter, including the password, with the right tools. If you use X protocol to perform X programs on the remote machine, you can also intercept the data you transmit and, of course, include the password. and SSHThese weaknesses were made up to encode the transmitted data.

SSH2 and SSH1

SSH2 to the SSH1 code made a large rewrite, according to the SSHThe company said that SSH2 98% of the program code and SSH1 is not the same. In addition to the RSA method provided by SSH1, SSH2 also provides additional public key coding and gold key exchange methods, SSH2 the use of DSA encoding and Diffie-hellman Gold Key exchange. In addition, also provides the SFTP, enables us to be safe in the FTP aspect.

File Download: ftp://ftp. SSH. com/pub/ SSH/;linuxnews.idv.tw/download/ SSH-1.2.31.tar.gz 1MB for Linux server;linuxnews.idv.tw/download/sshwin-2.4.0-pl2.exe 5MB for Win32 Client

Installation Environment: Redhat 7.0

1, after downloading the file to extract

Tar zxvf SSH-1.2.31.tar.gz

2, start compiling, installation

Cd SSH-1.2.31;

./configure;

Make

make install;

3, edit/etc/rc.d/rc.local to join/USR/SBIN/SSHD in order to boot automatically.

4. Complete

If you are 2 Linux to be connected to the installation of this program, if the Windows system to even Linux will be installed for the WINXX program. Winxx part Please try it yourself.

How Linux is used

/usr/bin/ SSH-l username 187.136.5.1

Then enter the password, even after the general text interface, you can start using.

Other than that SSHYou can use root login directly.

Note: You can edit/etc/hosts.deny and/etc/hosts.allow if you want to restrict the incoming IP.

Examples are as follows:

/etc/hosts.deny:

All:all

#禁止所有IP使用所有的服务

/etc/hosts.allow:

sshd:111.222.333.444

#开放111.222.333.444 Use SSHConnection

Use SSHto FTP

1, Linux for Linux Transfer File

Uploading: SCP wrong.php bha@187.136.5.1:

At this time will ask you the password, enter the password.

Description

SCP is an instruction

Wrong.php is the filename on the local side

bha@187.136.5.1 is the remote user name and IP

Finally remember that the colon must be added, which is the remote home directory.

Next pass: SCP bha@187.136.5.1:wrong.php.

Description

Use the SCP to copy the wrong.php of the bha@187.136.5.1 directory to the current directory (that is.)

2, win on Linux Transfer File

LS: That's dir.

ET: Next Transfer File

Put: Upload file

Exit: Quit FTP Program

directive: Psftp-x86 187.136.5.1

Then ask the name password and do not generate encryption key values, and then use put and get to go up and down Transfer File

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.