View Full Version : [ubuntu] Kill SFTP connections

February 21st, 2010, 12:15 AM
I want to use a cron job to backup my files to my server. Now when I run the script manually, I get an error when backing up (something and sftp file being used or so). I only get this when I'm simultaneously connected to my server with sftp. So to be sure that this doesnt happen when I wont be there anymore to look at the log, I would like to know if there is a command to kill all sftp connections. I would put this command in the backup scrip cron uses.

February 21st, 2010, 12:22 AM
I've not used it but have a look at TCPKILL, it may do what you require! :)

February 21st, 2010, 12:30 AM
Looks nice, but will scp still work?

February 21st, 2010, 12:37 PM
Not sure, try at the command line and see. :)

February 21st, 2010, 01:40 PM
Doesnt seem to work at all, when I use
sudo tcpkill -i eth0 host nothing happens. I get
tcpkill: listening on eth0 [host]
but nothing appears. On my notebook ( I can still do everyting I want (especially open SFTP connections). Is this a problem with tcpkill or do I have to find another solution for my problem?