Page 4 of 4
Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 8:22 am
by aleks1
i'm trying this...but i use usually ssh-keygen -b 2048 -t rsa...is the same thing right?

Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 8:27 am
by rajesh.mehra
Yes

go ahead
You have to set only password less login by nagios user and select best method according to you rsa or dsa

Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 8:45 am
by Stuart Watts
I'd just like to mention the security issues here - you're giving the nagios user keyed SSH access to the root account on a remote server. If anyone compromises the "nagios" account on the Nagios server, they'll also have root access to the remote server. This is really bad.
Check into some of the options for reducing the possible impacts here - you can limit what a user is allowed to do with an SSH key with the "command" statement in the authorized_keys file.
Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 8:50 am
by aleks1
Code: Select all
nagios@maestro:~$ ssh -p 2022 [email protected]
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-31-generic x86_64)
root@backups:~#
ok access without password!

and then?

try to abilitate service?

Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 8:54 am
by aleks1
Stuart Watts wrote:I'd just like to mention the security issues here - you're giving the nagios user keyed SSH access to the root account on a remote server. If anyone compromises the "nagios" account on the Nagios server, they'll also have root access to the remote server. This is really bad.
Check into some of the options for reducing the possible impacts here - you can limit what a user is allowed to do with an SSH key with the "command" statement in the authorized_keys file.
and how can i?:
you can limit what a user is allowed to do with an SSH key with the "command" statement in the authorized_keys file
Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 9:04 am
by rajesh.mehra
I am agree with Stuart Watts but I think nagios account is disabled at both sides remote server and local server.
Keep protect your key and enjoy

Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 9:16 am
by aleks1
yeah!!!!!

the check nagios work!!!!
Code: Select all
SERVICE ALERT: backups;Nagios Status;WARNING;SOFT;1;NAGIOS WARNING: 41 processes, status log updated 440 seconds ago
[1402581740] SERVICE ALERT: backups;Nagios Status;OK;SOFT;2;NAGIOS OK: 41 processes, status log updated 156 seconds ago
i'm really happy!!!!!
thank you very much!!!!! @rajesh.mehra @Stuart Watts
anyway @Stuart Watts
for this:
Check into some of the options for reducing the possible impacts here - you can limit what a user is allowed to do with an SSH key with the "command" statement in the authorized_keys file.
how can i do? or there is a specific documentation that can explain to me this function?

i'm newbie with nagios but i like it so much!!
@rajesh.mehra
Keep protect your key and enjoy
sure!!! nobody can steal my keys!!

Re: Remote command execution failed: Permission denied,pleas
Posted: Thu Jun 12, 2014 9:40 am
by rajesh.mehra
Hi
I am very

happy to help you..
Tks
Rajesh Mehra