Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I'm trying to enable remote root access to my server (I know you don't want to do it but i'll only have it open for a few hours). I can ssh as a user and then sudo to root and this works ok.
What i'm trying to do is login directly as root remotely. I've nulled the /etc/securetty file and changed "PermitRootLogin yes" in the /etc/ssh/ssh_config and sshd_config files.
When i login from my remote box, I see the following:
f004603:/ >ssh root@sydmon14
Read from remote host sydmon14: Connection reset by peer
Connection to sydmon14 closed.
When I check my loginlog, this is what I see.
Mar 2 15:54:29 localhost sshd[9308]: ROOT LOGIN REFUSED FROM 10.12.80.44
Mar 2 15:54:29 localhost sshd[9308]: fatal: monitor_read: unsupported request: 24
Is there anything else I should be doing or somewhere else I can check ???
I don't think you needed to 'null' the /etc/securetty file, but if after restarting sshd as Hiel Van Campen suggests it still doesn't work, can you try it again with ssh -v root@sydmon14 and post the output please?
Like the others said. You have to restart your ssh to read the changes. They are not dynamic.
Also, nulling (I assume you mean emptying the file) is a bad idea. If you want to allow root connections from another system, use the pty entries to control the number of terms allowed for root.
Example: /etc/securetty
pts/0
pts/1
and so on....
Enter as many pts entries as you want to allow terms for root. This will also allow you to telnet as root so you might want to disable the telnet-server in init.d or xinetd.d whichever you have if you haven't already.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.