Yes, I followed the instructions and created and downloaded the *.pem file correctly.
I‘ve terminated/rebooted/launched the instance many times already.
Too bad you couldn’t help figure out what the issue is. But thanks for trying.
I’ll reach out to AWS support to see if they can help.
Issue with EC2 Nagios XI AMI
-
hchohan1027
- Posts: 10
- Joined: Fri Dec 21, 2018 2:12 pm
Re: Issue with EC2 Nagios XI AMI
How do I find out the version of CentOS for the NagiosXI AMI?
Thanks,
HC
Thanks,
HC
Re: Issue with EC2 Nagios XI AMI
I apologize, I think I found the issue, please use cloud-user as the username instead of ec2-user and see if that resolves your issue, it did with mine. I'll update the developers to update the documentation.
So run this command:
To answer your other question, here is what it's running:
So run this command:
Code: Select all
ssh -i .ssh/nagiosxi.pem [email protected]Code: Select all
[[email protected] ~]$ cat /etc/redhat-release
CentOS release 6.10 (Final)-
hchohan1027
- Posts: 10
- Joined: Fri Dec 21, 2018 2:12 pm
Re: Issue with EC2 Nagios XI AMI
Thanks but that did not work for me.
I'm getting the following message:
ssh: connect to host ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com port 22: Operation timed out
I'm getting the following message:
ssh: connect to host ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com port 22: Operation timed out
-
hchohan1027
- Posts: 10
- Joined: Fri Dec 21, 2018 2:12 pm
Re: Issue with EC2 Nagios XI AMI
Rebooted the instance, now seeing this message:
With this command, I get the following:
$ ssh -v -i "nagios.pem" [email protected]
OpenSSH_7.7p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to ec2-X-XX-XXX-XX.compute-1.amazonaws.com port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file nagios.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file nagios.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: Authenticating to ec2-X-XX-XXX-XX.compute-1.amazonaws.com:22 as 'cloud-user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:V6i6dXD/xDGTKQ1MDKoKXapYbxQm3IeRgYFCBvyFihs
debug1: Host 'ec2-X-XX-XXX-XX.compute-1.amazonaws.com' is known and matches the RSA host key.
debug1: Found key in /Users/hchohan/.ssh/known_hosts:9
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Trying private key: nagios.pem
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
With this command, I get the following:
$ ssh -i .ssh/nagios.pem [email protected]
Warning: Identity file .ssh/nagios.pem not accessible: No such file or directory.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
With this command, I get the following:
$ ssh -v -i "nagios.pem" [email protected]
OpenSSH_7.7p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to ec2-X-XX-XXX-XX.compute-1.amazonaws.com port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file nagios.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file nagios.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
debug1: Authenticating to ec2-X-XX-XXX-XX.compute-1.amazonaws.com:22 as 'cloud-user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048<3072<8192) sent
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:V6i6dXD/xDGTKQ1MDKoKXapYbxQm3IeRgYFCBvyFihs
debug1: Host 'ec2-X-XX-XXX-XX.compute-1.amazonaws.com' is known and matches the RSA host key.
debug1: Found key in /Users/hchohan/.ssh/known_hosts:9
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Trying private key: nagios.pem
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
With this command, I get the following:
$ ssh -i .ssh/nagios.pem [email protected]
Warning: Identity file .ssh/nagios.pem not accessible: No such file or directory.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
-
hchohan1027
- Posts: 10
- Joined: Fri Dec 21, 2018 2:12 pm
Re: Issue with EC2 Nagios XI AMI
Some good news, I terminated my instance, relaunched it and I was able to SSH into it using:
ssh -i "nagios.pem" cloud-user@@ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com
I think the issue was with the key pair name. I deleted all the existing ones, created a new one and was able to SSH into the server with cloud-user.
But now, I'm having issues connecting via the browser. Getting the following error when navigating to:
http://ec2-XX-XXX-XXX-XXX.compute-1.ama ... m/nagiosxi
Not Found
The requested URL /nagiosxi was not found on this server.
Apache/2.2.15 (CentOS) Server at ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com Port 80
ssh -i "nagios.pem" cloud-user@@ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com
I think the issue was with the key pair name. I deleted all the existing ones, created a new one and was able to SSH into the server with cloud-user.
But now, I'm having issues connecting via the browser. Getting the following error when navigating to:
http://ec2-XX-XXX-XXX-XXX.compute-1.ama ... m/nagiosxi
Not Found
The requested URL /nagiosxi was not found on this server.
Apache/2.2.15 (CentOS) Server at ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com Port 80
Re: Issue with EC2 Nagios XI AMI
That's great to hear, I talked with the developers on it and they are going investigate it.
It was likely failing because it was pointing to .ssh/nagios.pem and it was unable to find the pem file (it tells you in the output below):
It was likely failing because it was pointing to .ssh/nagios.pem and it was unable to find the pem file (it tells you in the output below):
You latest command works because it's able to find the nagios.pem file in the current directory.Warning: Identity file .ssh/nagios.pem not accessible: No such file or directory.