Remote command execution failed: Permission denied,please...

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
aleks1
Posts: 43
Joined: Thu Nov 28, 2013 1:33 pm

Re: Remote command execution failed: Permission denied,pleas

Post by aleks1 »

i'm trying this...but i use usually ssh-keygen -b 2048 -t rsa...is the same thing right? :)
rajesh.mehra
Posts: 35
Joined: Mon Jan 27, 2014 2:38 am
Location: New Delhi, India

Re: Remote command execution failed: Permission denied,pleas

Post by rajesh.mehra »

Yes :D go ahead
You have to set only password less login by nagios user and select best method according to you rsa or dsa :D
Stuart Watts
Posts: 40
Joined: Wed Sep 25, 2013 7:01 am

Re: Remote command execution failed: Permission denied,pleas

Post 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.
aleks1
Posts: 43
Joined: Thu Nov 28, 2013 1:33 pm

Re: Remote command execution failed: Permission denied,pleas

Post by aleks1 »

Code: Select all

nagios@maestro:~$ ssh -p 2022 root@intranet.xx.xx
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? :)
Last edited by aleks1 on Thu Jun 12, 2014 9:23 am, edited 1 time in total.
aleks1
Posts: 43
Joined: Thu Nov 28, 2013 1:33 pm

Re: Remote command execution failed: Permission denied,pleas

Post 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
rajesh.mehra
Posts: 35
Joined: Mon Jan 27, 2014 2:38 am
Location: New Delhi, India

Re: Remote command execution failed: Permission denied,pleas

Post 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 :D
aleks1
Posts: 43
Joined: Thu Nov 28, 2013 1:33 pm

Re: Remote command execution failed: Permission denied,pleas

Post 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!! :)
rajesh.mehra
Posts: 35
Joined: Mon Jan 27, 2014 2:38 am
Location: New Delhi, India

Re: Remote command execution failed: Permission denied,pleas

Post by rajesh.mehra »

Hi :)

I am very :) happy to help you..

Tks
Rajesh Mehra
Locked