LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 04-16-2017, 05:19 AM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 280

Rep: Reputation: 17
need help on /etc/ssh/sshd_config


Hi,

I am able to rsync OS configuration to another server using public keys and enabling Permit root login yes in /etc/ssh/sshd_config

but my requirement is Permit root login should be no , and it should work with public keys, is it possible if yes then how?
 
Old 04-16-2017, 05:25 AM   #2
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 3,909
Blog Entries: 3

Rep: Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858Reputation: 1858
Which version of OpenSSH are you using? There are some differences in that area depending on version. Check the manual page for what the directive PermitRootLogin allows:

Code:
man sshd_config
If your Rsync usage has the same options every time, then you can set up a regular user for that and apply a specially configured line to /etc/sudoers to make it possible to run as root: https://en.wikibooks.org/wiki/OpenSS...rsync_and_sudo

For that you'll need to run the SSH client with the first level of verbosity -v and use what's shown there to craft your line in /etc/sudoers on the server.
 
Old 04-16-2017, 07:35 AM   #3
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,233
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
There are ways to rsync backup without allowing root to login.
THIS goes a long way today.
 
Old 04-16-2017, 09:11 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,365

Rep: Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566Reputation: 5566
Quote:
Originally Posted by manoj.linux View Post
Hi,
I am able to rsync OS configuration to another server using public keys and enabling Permit root login yes in /etc/ssh/sshd_config but my requirement is Permit root login should be no , and it should work with public keys, is it possible if yes then how?
manoj.linux, you've been here ten years at this point, and have asked many questions like this, that show little (if any) effort on your part. You've been repeatedly asked to read the "Question Guidelines" about doing your own research also. And, you asked something very similar to this IN 2007:
http://www.linuxquestions.org/questi...roblem-599288/

In the ten years that has passed since that question, have you learned nothing about SSH, or even tried to read the man pages on the configs? You asked about SSH two years ago as well:
http://www.linuxquestions.org/questi...sh-4175548881/

...similarly, about using keys for passwordless logins. I'm sorry, but an administrator with a DECADE of experience should be able to do some small amount of research of their own, especially since you've been told to many times in the past. The very first hit in Google for "rsync over ssh without password" is a complete how-to, which you can find if you go look.

Did you attempt to apply anything from your past threads, or do research on this first, before you posted?

Last edited by TB0ne; 04-16-2017 at 10:51 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh trying to configure sshd_config problem with ListenAddress and ssh restart pulper Linux - Networking 1 10-13-2014 08:20 AM
SSH: sshd_config changes: restart? Linux_Kidd Linux - Software 2 05-22-2013 01:48 PM
Slow login due to /etc/ssh/sshd_config configuration tesla75 Linux - Server 1 05-21-2013 07:47 AM
ssh to non-22 not working, edited sshd_config and restarted sshd NirvanaBaby Linux - Server 13 08-18-2011 09:48 AM
/etc/ssh/sshd_config: Permission Denied cK` Linux - Newbie 3 04-05-2010 11:58 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration