Force close on unattended SSH/SFTP connections
On Thu, Nov 20, 2008 at 19:14, Yanagisawa, Koji <email@example.com> wrote:
> I need unattended OpenSSH and its SFTP connections to be closed after a
> while (say, in 10 minutes).
I believe you can do that with iptables, using the ipt_recent module.
I did not test it or did it before, but looking at the man page it
looks like a tool that could be used to implement just that.
See "man iptables" and look for "recent". The examples usually do the
opposite (block someone for a certain amount of time), but you should
be able to come up with the rules to do what you want on your own.
See also http://snowman.net/projects/ipt_recent/
CentOS mailing list