I'm running into this problem where if my rsync to an Amazon CentOS instance breaks mid-transfer (with a Ctrl+C for example), subsequent logins to the server no longer works. The Server just responds with a Permission Denied.
I purposely recreated the problem on the server and compared with another "working" remote and noticed that the following process (obtained via netstat)
/tmp/ssh-xxxxxxxxxx/agent.10287
is replaced with
/var/run/rpcbind.sock
which undoubtedly is the remnant of the failed rsync.
My real question is, how do I prevent this from happening? I'm lucky to have maintained a connection with the server this time, but it won't be the case in a real rsync situation. I'm doing this via Mac OSX btw.
EDIT:
These are the errors in /var/log/audit/audit.log
sorry, a bit of digging gave me these error messages (/var/logs/audit/audit.log)
type=USER_AUTH msg=audit(1449596011.035:1271): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=pubkey acct="ec2-user" exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=ssh res=failed'
type=USER_AUTH msg=audit(1449596011.071:1272): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=pubkey acct="ec2-user" exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=ssh res=failed'
type=CRYPTO_KEY_USER msg=audit(1449596011.107:1273): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=destroy kind=server fp= 3a:38:b2:ce:9b:ad:68:7e:6b:26:10:aa:88:e4:32:cc direction=? spid=29683 suid=74 exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=? res=success'
type=CRYPTO_KEY_USER msg=audit(1449596011.107:1274): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=destroy kind=session fp=? direction=both spid=29683 suid=74 rport=55760 laddr=172.30.0.175 lport=22 exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=? res=success'
type=USER_ERR msg=audit(1449596011.107:1275): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:bad_ident grantors=? acct="?" exe="/usr/sbin/sshd" hostname=216-191-83-42.dedicated.allstream.net addr=x.x.x.x terminal=ssh res=failed'
type=CRYPTO_KEY_USER msg=audit(1449596011.107:1276): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=destroy kind=server fp=3f:3c:c8:a4:e7:63:46:84:5c:11:d1:19:28:66:b9:54 direction=? spid=29682 suid=0 exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=? res=success'
type=CRYPTO_KEY_USER msg=audit(1449596011.107:1277): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=destroy kind=server fp=cc:6a:de:3e:ed:95:10:ee:21:28:6d:3f:7e:1e:2a:6d direction=? spid=29682 suid=0 exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=? res=success'
type=CRYPTO_KEY_USER msg=audit(1449596011.107:1278): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=destroy kind=server fp=3a:38:b2:ce:9b:ad:68:7e:6b:26:10:aa:88:e4:32:cc direction=? spid=29682 suid=0 exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=? res=success'
type=USER_LOGIN msg=audit(1449596011.107:1279): pid=29682 uid=0 auid=4294967295 ses=4294967295 msg='op=login acct="ec2-user" exe="/usr/sbin/sshd" hostname=? addr=x.x.x.x terminal=ssh res=failed'