SSH Remote Management Linux common command file upload download

Source: Internet
Author: User
Tags chmod extract zip file file upload first row zip vps port number ssh port

First, open the main page, input host is your IP, port default 22, user default root, password see you open mail. Note that you can check the store below the password ... so that you don't have to enter the password every time:

Second, the options below on login, is after landing, open the program. The default is SSH and SFTP, if you do not need SFTP can be canceled, then, click on the bottom login login:

Third, you will be prompted to save hotkey,accept and Save:

Four, after the successful landing, will pop up 2 new windows, is a command line window, a sftp window. The command line window, is usually the most commonly used, installs the software, compiles the program and so on uses it. Another SFTP window that can be used to transfer files.

SFTP window I will not be introduced in detail, the peaceful use of the FTP software is the same, you can upload or download the file, this is very practical, attention, do not understand which file practical use, do not arbitrarily delete files, otherwise it may lead to a VPS error.

Next, I'll focus on a few of the most frequently used commands in SSH:

1. The top command can view the system status in real time:

The focus area is the first row of the load average is the system load, that is, the entire VPS resource occupancy, if the normal station, usually rarely more than 5 of the time, burst more than 20 will be sealed. The third row of the first, this is CPU consumption resources. And the back? %wa This is the hard drive state, the CPU is normally best not more than 30% of the occupied. WA index long-term more than 30%, basically hard drive is not to force state. The four rows are memory, how much, how much, how much.

Press CTRL + C to stop executing the current program and return to #.

2.wget command to download files, for example:

wget http://cachefly.cachefly.net/100mb.test

Download cachefly files, test your VPS bandwidth and network situation to power or not? Compare DS2 knife 1G, download speed 70m/s,vpsyou hundred trillion mouth, download speed 9.8m/s.

3.VI command This is an editor, similar to the Notepad Notepad under win:

Vi/etc/ssh/sshd_config

Simple to say the use of VI process, vi a file, and then press I, the lower left corner will show inserts, this time before you can modify this file. After modification, press ESC to insert and disappear in the lower left corner, and then enter: The bottom left corner appears:, then enter X, return, then save to exit.

Delete the # (note) before Port 22 and modify port 1688. Then, performing the service sshd restart will modify your default SSH port number of 1688 to enhance security performance.

4.chmod Command #后就是这个命令的说明

chmod +x/home/auto.sh # gives auto.sh executable permissions

Chmod-r 777/home/wwwroot # gives/home/wwwroot Write permission (required for partial web site program installation)

5.MV command to move files

Mv/home/wwwroot/abc.tar.gz/home/backup # Move abc.tar.gz to the backup directory

6.rm command to delete file

RM test.tar.gz # Delete test.tar.gz, you will be prompted to confirm Y can

Rm-rf/home/wwwroot/test # no hint directly delete test directory, do not use, remember.

7.tar command C package and x extract files

Tar zcvf test.tar.gz/home/wwwroot #把/home/wwwroot Package

Tar zxvf tet.tar.gz # Uncompressed in current directory test.tar.gz

8. Extract zip file Package

Unzip Name.zip

Other common commands

cd Example: Cd/home/wwwroot # into a directory

LS # view current directory file

echo nameserver 8.8.8.8 >>/etc/resolv.conf #设置dns为G家的

In the wrong input command, may appear ^hh^h2 like garbled, CTRL + C interrupt the current operation, can be again.

There are a lot of commonly used commands, which are updated here, with which to update them.

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.