I'm using Aws transfer for sftp as sftp server, but when i connect to sftp from any client (winscp, linux, aws linux server) it keeps disconnecting after 3,4 minutes. But when i change ssh server alive values from client side, connection is there until i disconnect.

I know in normal linux sftp servers we can rectify this by increasing client alive interval value from server side without changing every sftp client settings. but how can i do such a change in "aws transfer for sftp" ?

  • This is hardly Linux question. – Martin Prikryl Apr 23 at 6:06
  • 4
    I'm voting to close this question as off-topic because "AWS Transfer for SFTP" is not a Unix service within the scope of this site. – Stephen Harris Apr 25 at 23:41

I quickly browsed Amazon's documentation for AWS Transfer for SFTP, and unfortunately it looks like this AWS service does not include a way to adjust any of the technical settings of the SFTP/SSHD service. So there is no way to enable SSH server-side keepalives (which is what the "client alive interval" setting does) in AWS Transfer for SFTP.

Your only choice would be to contact Amazon AWS support, tell them about your requirement and perhaps register a "wishlist" item for future development of this service.

However, you might wish to talk to your network administrator to find out the reason why your SFTP connections are disconnecting. If your site has a firewall with an overly strict connection idle timeout policy, the firewall might be the one breaking the connections. If there were no firewalls and no network problems, an idle SFTP connection should in theory stay alive indefinitely.

(Sometimes such a strict idle timeout policy indicates the firewall's performance does not quite meet the demands placed to it: if a firewall is getting overloaded, more aggressive reaping of old connections is one way to work around it without adding new firewall hardware. But 3 or 4 minutes is in my opinion excessively strict.)

  • Hi , Thank you very much for the time and effort taken to answer my question. Yes i will raise this concern to aws and see :) – madprinciple Apr 29 at 6:21
  • sftp client is again aws server, but i believe aws uses firewalls to protect sftp service and which might be the reason. – madprinciple Apr 29 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.