0

Imagine performing a short repetitive process, which ends by doing a short lived SSH connection to some server (e.g. transferring a newly generated file via SFTP). This means that there will be a lot of short lived consecutive SSH connecting and disconnecting.

Are there any considerations needs to be taken into account in such situation? E.g. possible SSH connection request limit etc.

1 Answers1

3

If task is repetitive I would suggest to use persistent(Long lived) ssh connections for that you can use ControlMaster, new connections are expensive and good volume of connection can kill(unresponsive) the host itself. You can use ControlMaster with ServerAliveInterval in your ssh config settings for good example refer this How can I create persistent SSH connection to "stream" commands over a period of time?

asktyagi
  • 3,038