Linux, ssh, vsftpd, setmod, etc.

Source: Internet
Author: User
Linux, ssh, vsftpd, setmod, and so on -- Linux Enterprise Application-Linux server application information. The following is a detailed description. Use SSH to log on to another machine

# Ssh 192.168.0.106

The output is as follows:



@ WARNING: remote host identification has changed! @



It is possible that someone is doing something nasty!

Someone cocould be eavesdropping on you right now (man-in-the-middle attack )!

It is also possible that the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is

A5: 1c: 99: 1f: fa: d7: 1e: 76: 8b: 0a: 67: eb: 4f: 90: 24: 7a.

Please contact your system administrator.

Add correct host key in/root/. ssh/known_hosts to get rid of this message.

Offending key in/root/. ssh/known_hosts: 4

RSA host key for 192.168.0.106 has changed and you have requested strict checking.

Host key verification failed.

Because I used SSH to log on to this remote computer on a local machine (or another host identified by this IP address), The known_hosts record is left, authentication fails because the system is re-installed on the remote computer or the IP address is changed to another SSHD host. Delete ~ The corresponding project in/. ssh/known_hosts (the red Offending key in/root/. ssh/known_hosts: 4 above, delete the Fourth Record). The problem is solved.

When I saw this problem, I went online and did not carefully read the above information. In fact, it already tells us how to do it.

Scp is a file copy with Security and is used for ssh logon. For example, to copy the current file to another remote host, you can run the following command.

Scp/home/daisy/full.tar.gz root@192.168.0.106:/home/root

Then, you will be prompted to enter the logon password of the root user of another host 192.168.0.106, and copy the password.

If you want to copy files from the remote host to the current system, it is also very easy.

Root@192.168.0.106 scp:/home/root/home/daisy/full.tar.gz

Note the red colon above: I didn't know how to represent the remote directory at the time, so I checked the Internet and added a colon to the directory.



Because the vsftpd service is used in linux, I want to limit the directories of different login users. I asked Zhang Gong, who said that vsftpd is used by the system? Use? Why? So? Set to use ???? You can? To the purpose, can I use the usermod command, Chinese? Elliptical? Found on W as follows:

Function Description: modify a user account.

Syntax: usermod [-LU] [-c <备注> ] [-D <登入目录> ] [-E <有效期限> ] [-F <缓冲天数> ] [-G <群组> ] [-G <群组> ] [-L <帐号名称> ] [-S ] [-U ] [User Account]

Note: usermod can be used to modify user account settings.

Parameters:

-C <备注> Modify the remarks of a user account.

-D logon directory> modify the directory when a user logs in.

-E <有效期限> Modifies the validity period of an account.

-F <缓冲天数> The account is closed after the password expires.

-G <群组> Modify the group to which the user belongs.

-G <群组> Modify the additional group to which the user belongs.

-L <帐号名称> Modify the account name.

-L lock the user password to make it invalid.

-S Modify the shell used after the user logs in.

-U Modify the user ID.

-U unlocks the password.



In linux ??? R:

1. You can put it in the/etc/rc. d/init. d/rc. local file.

Ifconfig eth0 192.168.0.106

Route add default gw 192.168.0.1

2. Configure the NIC configuration file

Create or modify this file/etc/sysconfig/network-scripts/ifcfg-eth0 # ifcfg-eth0

DEVICE = eth0

BOOTPROTO = static

IPADDR = 192.168.0.106

NETMASK = 255.255.255.0

GATEWAY = 192.1689.0.1



When linux started the init process, the init process called the/etc/inittab script.

I think the information during linux Startup should be the first to call the/etc/rc. d/rc. sysinit script, and then start the init process.

During the startup process, you can press ctrl + c to interrupt the system startup and enter LOGIN in advance. this is what my boss taught me. in addition, you need to check the startup information. After the system completes the required initialization tasks, press ctrl + c. Otherwise, you cannot do what you want.

For example, in/etc/rc. d/rc. we have added our own applications to sysinit. In the/etc/inittab, we changed the startup mode to single (single user mode, no LOGIN). After the system starts, it will run our own program. The problem is that after we run our program, we cannot stop it. If we want to modify anything about our program, it will be hard to do it, now, before the system starts our program, press ctrl + c to enter bash in advance.

At the beginning, we did this, but after going in, the system was read-only (I knew several times that I went in after mounting root file system in read mode ), I don't know where the problem is. The boss restarted the system and suddenly said that he knew how to get it.

Remounting root file system in read-write mode

Press ctrl + c

I only know that the startup information is important. in linux, if a problem occurs, you need to find the answer from the point closest to the problem (I think this sentence is a classic, Western)

Switch between different linux running levels:

# Init run-level

Run-level:

# Default runlevel. The runlevels used by RHS are:

#0-halt (Do NOT set initdefault to this)

#1-Single user mode

#2-Multiuser, without NFS (The same as 3, if you do not have networking)

#3-Full multiuser mode (text)

#4-unused

#5-X11

#6-reboot (Do NOT set initdefault to this)

The above translation is:

#0-stop (never set initdefault to 0)

#1-single-user mode

#2-multi-user, no NFS (no network)

#3-full multi-user mode (the standard running level is actually the text mode)

#4-useless

#5-X11 (xwindow)

#6-Restart

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.