0
I have been troubleshooting this issue for quite some time now and I cannot figure out the cause of this issue. We have a job running on an AIX server that uses Perl::SFTP to connect to a Linux RHEL 7 server. This job works around 3/10 runs. This is what I am seeing in /var/log/secure as far as connections are concerned. Had to remove some things for work security reasons.
This is what it looks like when it works
Jul 22 03:17:28 hostname sshd[28505]: Set /proc/self/oom_score_adj to 0
Jul 22 03:17:28 hostname sshd[28505]: Connection from 10.8.**.*** port 45372
Jul 22 03:18:49 hostname sshd[28505]: Failed publickey for user1 from 10.8.**.*** port 45372 ssh2
Jul 22 03:18:49 hostname sshd[28505]: pam_succeed_if(sshd:auth): requirement "user in root:db2dba" not met by user "user1"
Jul 22 03:18:49 hostname sshd[28505]: Accepted password for user1 from 10.8.**.*** port 45372 ssh2
Jul 22 03:18:49 hostname sshd[28505]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
This is what it looks like when it fails. There is nothing more than this in the log
Jul 22 14:37:04 hostname sshd[3697]: Set /proc/self/oom_score_adj to 0
Jul 22 14:37:04 hostname sshd[3697]: Connection from 10.8.**.*** port 46718
Here is the output from the job when it fails
Computing shared secret key.
Verifying server signature.
Waiting for NEWKEYS message.
Send NEWKEYS.
Enabling encryption/MAC/compression.
Sending request for user-authentication service.
Failed transmitting /model/claims/jobs/data/EA_COVERAGESFEED.DAT
Here is the job succeeding
Computing shared secret key.
Verifying server signature.
Waiting for NEWKEYS message.
Send NEWKEYS.
Enabling encryption/MAC/compression.
Sending request for user-authentication service.
Service accepted: ssh-userauth.
Trying empty user-authentication request.
Authentication methods that can continue: publickey,gssapi-keyex,gssapi-with-mic,password.
Next method to try is publickey.
Trying pubkey authentication with key file '/model/.ssh/id_dsa'
Authentication methods that can continue: publickey,gssapi-keyex,gssapi-with-mic,password.
Next method to try is publickey.
Next method to try is password.
Any ideas or help would be greatly appreciated. Sorry I can't give more information on the job as I do not have access to it.
For what reason are you using Perl::SFTP over other SFTP clients? – JohnnyVegas – 2019-07-22T20:53:44.813
Can you use packet capture to check whether the server, or the client, is the last one to send a packet? (Or maybe run sshd in debug mode?) Either it's a network problem, or Perl::SFTP just forgets to flush the outgoing buffer... – user1686 – 2019-07-23T04:40:02.873