How to remotely connect to the server as a root user
Source: Internet
Author: User
How to Use the root identity to remotely connect to the server-Linux Enterprise Application-Linux server application information is as follows. RedHat recommends that you use Secure ssh to remotely log on to the server, instead of using telnet, because the password is transmitted in plaintext when you connect to the server through telnet. Therefore, by default, the root user is not allowed to directly log on to the server via telnet.
This document assumes that you have installed the telnet-server software package, configured it correctly, and listened to port 23.
To force the root user to connect to the server through telnet, modify/etc/pam. d/login. The default file is as follows:
# % PAM-1.0
Auth required pam_securetty.so
Auth required pam_stack.so service = system-auth
Auth required pam_nologin.so
Account required pam_stack.so service = system-auth
Password required pam_stack.so service = system-auth
Session required pam_stack.so service = system-auth
Session optional pam_lele.so
The first line controls root not to allow telnet to the server. To allow root to log on to the server via telnet, modify the file as follows:
# % PAM-1.0
# Commented out below line in order to allow root access for telnet
# Auth required pam_securetty.so
Auth required pam_stack.so service = system-auth
Auth required pam_nologin.so
Account required pam_stack.so service = system-auth
Password required pam_stack.so service = system-auth
Session required pam_stack.so service = system-auth
Session optional pam_lele.so
After the modification, you can log on to the server as the root user:
[Root @ jaws root] # telnet 10.0.0.15
Trying 10.0.0.15...
Connected to 10.0.0.15.
Escape character is '^]'.
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
Kernel 2.4.21-32.0.1.ELsmp on an i686
Login: root
Password:
Last login: Sat Oct 22 11:58:56 from 10.0.0.25
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