Results 1 to 5 of 5

Thread: Kill SFTP connections

  1. #1
    Join Date
    Feb 2009
    Location
    47.3505, 8.71842
    Beans
    168
    Distro
    Ubuntu 11.04 Natty Narwhal

    Kill SFTP connections

    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.
    “The ships hung in the sky in much the same way that bricks don't.”
    Douglas Adams

  2. #2
    Join Date
    Sep 2006
    Location
    Walkhampton, Devon UK
    Beans
    371
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Kill SFTP connections

    I've not used it but have a look at TCPKILL, it may do what you require!
    Infamy! Infamy! They've all got it in for me!

  3. #3
    Join Date
    Feb 2009
    Location
    47.3505, 8.71842
    Beans
    168
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Kill SFTP connections

    Looks nice, but will scp still work?
    “The ships hung in the sky in much the same way that bricks don't.”
    Douglas Adams

  4. #4
    Join Date
    Sep 2006
    Location
    Walkhampton, Devon UK
    Beans
    371
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Kill SFTP connections

    Not sure, try at the command line and see.
    Infamy! Infamy! They've all got it in for me!

  5. #5
    Join Date
    Feb 2009
    Location
    47.3505, 8.71842
    Beans
    168
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Kill SFTP connections

    Doesnt seem to work at all, when I use
    Code:
    sudo tcpkill -i eth0 host 192.168.0.4
    nothing happens. I get
    Code:
    tcpkill: listening on eth0 [host 192.168.0.4]
    but nothing appears. On my notebook (192.168.0.4) 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?
    “The ships hung in the sky in much the same way that bricks don't.”
    Douglas Adams

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •