Gerald,

Yes, you are right connection disconnect immediately. 

Auth.log on remote machine 192.168.1.111

Feb  6 18:28:57 ob-vikee sshd[10931]: Accepted publickey for nagios from 
192.168.1.110 port 50496 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 18:28:57 ob-vikee sshd[10931]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 18:28:57 ob-vikee systemd-logind[459]: Removed session 25.
Feb  6 18:28:57 ob-vikee systemd-logind[459]: New session 26 of user nagios.
Feb  6 18:28:57 ob-vikee sshd[11001]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 18:28:57 ob-vikee sshd[10931]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 18:29:13 ob-vikee sshd[11007]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:30:13 ob-vikee sshd[11041]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:31:13 ob-vikee sshd[11065]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:32:13 ob-vikee sshd[11089]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:33:13 ob-vikee sshd[11113]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:34:13 ob-vikee sshd[11137]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:35:13 ob-vikee sshd[11161]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:36:13 ob-vikee sshd[11185]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:37:13 ob-vikee sshd[11210]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:38:13 ob-vikee sshd[11235]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:39:01 ob-vikee CRON[11256]: pam_unix(cron:session): session opened 
for user root by (uid=0)
Feb  6 18:39:01 ob-vikee CRON[11256]: pam_unix(cron:session): session closed 
for user root
Feb  6 18:39:13 ob-vikee sshd[11273]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:40:13 ob-vikee sshd[11298]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:40:50 ob-vikee sshd[11308]: Accepted publickey for nagios from 
192.168.1.110 port 50572 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 18:40:50 ob-vikee sshd[11308]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 18:40:50 ob-vikee systemd-logind[459]: Removed session 26.
Feb  6 18:40:50 ob-vikee systemd-logind[459]: New session 27 of user nagios.
Feb  6 18:40:50 ob-vikee sshd[11375]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 18:40:50 ob-vikee sshd[11308]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 18:40:56 ob-vikee sshd[11383]: Accepted publickey for nagios from 
192.168.1.110 port 50574 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 18:40:56 ob-vikee sshd[11383]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 18:40:56 ob-vikee systemd-logind[459]: Removed session 27.
Feb  6 18:40:56 ob-vikee systemd-logind[459]: New session 28 of user nagios.
Feb  6 18:40:56 ob-vikee sshd[11447]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 18:40:56 ob-vikee sshd[11383]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 18:41:13 ob-vikee sshd[11458]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:41:15 ob-vikee sshd[11461]: Accepted publickey for nagios from 
192.168.1.110 port 50576 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 18:41:15 ob-vikee sshd[11461]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 18:41:15 ob-vikee systemd-logind[459]: Removed session 28.
Feb  6 18:41:15 ob-vikee systemd-logind[459]: New session 29 of user nagios.
Feb  6 18:41:15 ob-vikee sshd[11526]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 18:41:15 ob-vikee sshd[11461]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 18:41:48 ob-vikee sshd[11534]: Accepted publickey for nagios from 
192.168.1.110 port 50584 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 18:41:48 ob-vikee sshd[11534]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 18:41:48 ob-vikee systemd-logind[459]: Removed session 29.
Feb  6 18:41:48 ob-vikee systemd-logind[459]: New session 30 of user nagios.
Feb  6 18:41:49 ob-vikee sshd[11600]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 18:41:49 ob-vikee sshd[11534]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 18:42:13 ob-vikee sshd[11617]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:43:13 ob-vikee sshd[11641]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:44:13 ob-vikee sshd[11663]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:45:13 ob-vikee sshd[11686]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:46:13 ob-vikee sshd[11711]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:47:13 ob-vikee sshd[11735]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:48:13 ob-vikee sshd[11759]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:49:13 ob-vikee sshd[11783]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:50:13 ob-vikee sshd[11807]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:51:13 ob-vikee sshd[11833]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:52:13 ob-vikee sshd[11858]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:53:13 ob-vikee sshd[11883]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:54:13 ob-vikee sshd[11907]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:55:13 ob-vikee sshd[11929]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:56:13 ob-vikee sshd[11953]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:57:13 ob-vikee sshd[11977]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:58:13 ob-vikee sshd[12002]: Connection closed by 127.0.0.1 [preauth]
Feb  6 18:59:13 ob-vikee sshd[12026]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:00:13 ob-vikee sshd[12059]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:01:13 ob-vikee sshd[12084]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:02:13 ob-vikee sshd[12108]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:03:13 ob-vikee sshd[12133]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:04:13 ob-vikee sshd[12158]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:05:13 ob-vikee sshd[12183]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:06:13 ob-vikee sshd[12207]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:07:13 ob-vikee sshd[12232]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:08:13 ob-vikee sshd[12257]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:09:01 ob-vikee CRON[12278]: pam_unix(cron:session): session opened 
for user root by (uid=0)
Feb  6 19:09:01 ob-vikee CRON[12278]: pam_unix(cron:session): session closed 
for user root
Feb  6 19:09:13 ob-vikee sshd[12295]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:10:13 ob-vikee sshd[12319]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:11:13 ob-vikee sshd[12343]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:12:13 ob-vikee sshd[12368]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:13:07 ob-vikee sshd[12391]: Accepted publickey for nagios from 
192.168.1.110 port 50782 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 19:13:07 ob-vikee sshd[12391]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 19:13:07 ob-vikee systemd-logind[459]: Removed session 30.
Feb  6 19:13:07 ob-vikee systemd-logind[459]: New session 31 of user nagios.
Feb  6 19:13:07 ob-vikee sshd[12499]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 19:13:07 ob-vikee sshd[12391]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 19:13:13 ob-vikee sshd[12502]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:13:36 ob-vikee sshd[12507]: Accepted publickey for nagios from 
192.168.1.110 port 50786 ssh2: RSA 
68:24:0a:9f:55:7c:3d:b1:29:92:6a:d7:b7:5d:bd:d1
Feb  6 19:13:36 ob-vikee sshd[12507]: pam_unix(sshd:session): session opened 
for user nagios by (uid=0)
Feb  6 19:13:36 ob-vikee systemd-logind[459]: Removed session 31.
Feb  6 19:13:36 ob-vikee systemd-logind[459]: New session 32 of user nagios.
Feb  6 19:13:37 ob-vikee sshd[12575]: Received disconnect from 192.168.1.110: 
11: disconnected by user
Feb  6 19:13:37 ob-vikee sshd[12507]: pam_unix(sshd:session): session closed 
for user nagios
Feb  6 19:14:13 ob-vikee sshd[12593]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:15:13 ob-vikee sshd[12618]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:16:13 ob-vikee sshd[12644]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:17:01 ob-vikee CRON[12673]: pam_unix(cron:session): session opened 
for user root by (uid=0)
Feb  6 19:17:01 ob-vikee CRON[12673]: pam_unix(cron:session): session closed 
for user root
Feb  6 19:17:13 ob-vikee sshd[12681]: Connection closed by 127.0.0.1 [preauth]
Feb  6 19:17:15 ob-vikee sudo[12679]: pam_unix(sudo:auth): conversation failed
Feb  6 19:17:15 ob-vikee sudo[12679]: pam_unix(sudo:auth): auth could not 
identify password for [nagios]
Feb  6 19:17:15 ob-vikee sudo[12679]:   nagios : user NOT in sudoers ; 
TTY=pts/3 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/tail -1000 auth.log
Feb  6 19:17:20 ob-vikee su[9526]: pam_unix(su:session): session closed for 
user nagios


 
 

On 07/02/18, 2:18 PM, "icinga-users on behalf of Gerald Vogt" 
<icinga-users-boun...@lists.icinga.org on behalf of v...@spamcop.net> wrote:

    
    
    On 07.02.18 09:44, Vikee Kumar wrote:
    > I am able to successfully authenticate over ssh.
    
    But obviously you don't get a shell with that account:
    
    > Output
    > 
    > root@mgmt-vikee:~# ssh -i /var/lib/nagios/.ssh/id_rsa 
nagios@192.168.1.111 -v
    > OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
    > debug1: Reading configuration data /etc/ssh/ssh_config
    ...
    > debug1: Authentication succeeded (publickey).
    > Authenticated to 192.168.1.111 ([192.168.1.111]:22).
    > debug1: channel 0: new [client-session]
    > debug1: Requesting no-more-sessi...@openssh.com
    > debug1: Entering interactive session.
    > debug1: Sending environment.
    > debug1: Sending env LANG = en_US.UTF-8
    > Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.11-grseconprem x86_64)
    ...
    > Your Hardware Enablement Stack (HWE) is supported until April 2019.
    > Last login: Tue Feb  6 19:13:07 2018 from 192.168.1.110
    > debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
    > debug1: client_input_channel_req: channel 0 rtype e...@openssh.com reply 0
    > debug1: channel 0: free: client-session, nchannels 1
    > Connection to 192.168.1.111 closed.
    > Transferred: sent 3676, received 3080 bytes, in 0.3 seconds
    > Bytes per second: sent 14179.6, received 11880.7
    > debug1: Exit status 1
    
    The connection is immediately closed again...
    
    -Gerald
    _______________________________________________
    icinga-users mailing list
    icinga-users@lists.icinga.org
    https://lists.icinga.org/mailman/listinfo/icinga-users
    

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to