- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Disabling root login via Secure Shell
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 08:35 AM
07-14-2006 08:35 AM
Disabling root login via Secure Shell
What configuration file(s) and what syntax should I use to modify in order to prevent the root user from being able to log into a system via SSH? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 08:40 AM
07-14-2006 08:40 AM
Re: Disabling root login via Secure Shell
as root, run these two commands:
echo console >/etc/securetty
chmod 600 /etc/securetty
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 08:42 AM
07-14-2006 08:42 AM
Re: Disabling root login via Secure Shell
PermitRootLogin no
will disallow root logins via SSH. The location of the file may vary depending on where you got your SSH from.
I am using the HP distributed SSH and this file is located in /etc/opt/ssh.
You will have to stop and restart SSH for this to take effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 08:44 AM
07-14-2006 08:44 AM
Re: Disabling root login via Secure Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 08:44 AM
07-14-2006 08:44 AM
Re: Disabling root login via Secure Shell
To prevent root from logging in via ssh modify the sshd.config file and look for the PermitRootLogin line, you want to change this parameter to no.
The location of the file is in /opt/ssh/etc, at the end please restart the service.
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 08:51 AM
07-14-2006 08:51 AM
Re: Disabling root login via Secure Shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 09:08 AM
07-14-2006 09:08 AM
Re: Disabling root login via Secure Shell
#Banner /some/path
and replace /some/path with whatever the path to the banner message you want displayed.
Restart sshd and you've got it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2006 06:14 PM
07-22-2006 06:14 PM
Re: Disabling root login via Secure Shell
The thread is quite informative but i want to dissable root login using password over ssh. I want ssh root login using public key authentication to be remain open. How to do that
I have lots of scripts which calls programmes from one server to other using public key login. I cant stop those.
Pls help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2006 06:59 PM
07-22-2006 06:59 PM
Re: Disabling root login via Secure Shell
Please read "man sshd_config" for more information.
The "without-password" does NOT mean root can login with no authentication at all: it means that root can use any authentication mechanism other than a password to log in. Usually this means SSH keys, but in some environments this could also mean smart card, SecurID or some other authentication system.
The "forced-commands-only" is a very strict setting: it accepts SSH keys only, *and* each authorized key must have a fixed command defined for it in the root user's ~/.ssh/authorized_keys file. When a root login is made using a key, sshd does not even check what the client wanted: it runs the command specified for that key, and nothing else. When that command completes, the connection is closed.
The "forced-commands-only" option might be useful if someone steals the keys you're using for automated actions with root access. In the normal situation, the thief can do *anything* to your systems; but if you're using forced commands, the damage is limited. For example, if someone steals the key used to make backups, you know the thief can steal your data (by making an "extra backup") but he/she cannot corrupt the data in your system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2006 03:15 PM
07-23-2006 03:15 PM
Re: Disabling root login via Secure Shell
find your configuration for ssh config. for default, sshd_config put in /opt/ssh/etc
edit line:
PermitRootlogin No
than restart your sshd daemon:
#ps -ef|grep sshd
#kill -HUP pid of sshd
-yut-