FTP connection locks me out - SSH

This is a discussion on FTP connection locks me out - SSH ; I installed CentOS 5.1. With the default installation the only opened port is 22 and SSH is configured to accept connections. I login to the system, do a lot of stuff, work with X (using NX), install rpms, etc. I ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: FTP connection locks me out

  1. FTP connection locks me out

    I installed CentOS 5.1. With the default installation the only opened
    port is 22 and SSH is configured to accept connections. I login to the
    system, do a lot of stuff, work with X (using NX), install rpms, etc.
    I have even installed XEN without problems. Now, I would like to
    transfer some big files (8 GB each) from CentOS to a Windows machine.
    Just to make it easy I login to CentOS using ssh and I connect from
    CentOS to the Windows machine using FTP. Now I put some files in the
    Windows machine. After some time the connection to the CentOS machine
    is lost and I can't connect anymore to the CentOS machine. I tried to
    restart sshd, network and iptable scripts. No way. I'm locked out. If
    I login to the CentOS with the interactive console, I can see sshd is
    running and is not blocked (I can do "ssh localhost" without
    problems). What can it be? Something related to security or something?

    Thank you in advance for your help

    Cold

  2. Re: FTP connection locks me out

    cold80 wrote:
    > I installed CentOS 5.1. With the default installation the only opened
    > port is 22 and SSH is configured to accept connections. I login to the
    > system, do a lot of stuff, work with X (using NX), install rpms, etc.
    > I have even installed XEN without problems. Now, I would like to
    > transfer some big files (8 GB each) from CentOS to a Windows machine.
    > Just to make it easy I login to CentOS using ssh and I connect from
    > CentOS to the Windows machine using FTP. [..]


    So you connection from your CentOS system to you Windows system is pure
    FTP based and your subject mentions an FTP problem, what does this have
    to do with SSH? I think your Subject is misleading ..

    > [..] Now I put some files in the
    > Windows machine. After some time the connection to the CentOS machine
    > is lost and I can't connect anymore to the CentOS machine. [..]


    And this is from the host from where you connected to your CentOS system?

    For the stability for you connection you can try experimenting with
    (keep)Alive settings, see "man ssh" and "man sshd_config" for more
    details, but this shouldn't fix the lockout problem.

    I don't see any relation between the FTP connection and the SSH
    connection, other that that your experience is probably that your SSH
    connection only terminates when you use FTP to another system (is this
    true?).

    If you only experience problems with FTP'ing big files (to a Windows
    box), the only thing I can think about is that only NTFS can cope with
    files bigger as 4 GB, but that should only stall or abort your FTP
    connection.

    What's interesting to know is if:

    - your FTP connection terminates first (if it terminates) before your
    SSH connection terminates?
    - you FTP connection dies after your SSH connection dies?
    - you see your old shell/ssh proces still active on the server after the
    connection gets lost?

    > [..] I tried to
    > restart sshd, network and iptable scripts. No way. I'm locked out. If
    > I login to the CentOS with the interactive console, [..]


    Just curious, before using the the interactive console, how do you
    restart sshd when you're locked out?

    > [..] I can see sshd is
    > running and is not blocked (I can do "ssh localhost" without
    > problems). What can it be? Something related to security or something?


    Try connecting to your network interface's IP address, although I'm not
    sure if the kernel would still use the loopback interface. Try
    connecting from another box (your Windows box comes to mind), to see if
    it's only the machine you started on is locked out, or any host.

    Curious again: how do you solve it now? Reboot the CentOS system?

    --
    Regards,
    Harrie

  3. Re: FTP connection locks me out

    You're right, this problem seems to have nothing to do with ftp. Maybe
    I have to try from another machine as you suggested. Now the only way
    to "unlock it" is rebooting the system. Actually I'm thinking there's
    a problem with iptable, so as soon as I can I will try to disable
    iptable or removing all the rules set on it. Anyway, even if it was a
    problem of firewall, I can't understand why it's happening after a
    while...

    On Feb 6, 3:34*am, Harrie wrote:
    > cold80 wrote:
    > > I installed CentOS 5.1. With the default installation the only opened
    > > port is 22 and SSH is configured to accept connections. I login to the
    > > system, do a lot of stuff, work with X (using NX), install rpms, etc.
    > > I have even installed XEN without problems. Now, I would like to
    > > transfer some big files (8 GB each) from CentOS to a Windows machine.
    > > Just to make it easy I login to CentOS using ssh and I connect from
    > > CentOS to the Windows machine using FTP. [..]

    >
    > So you connection from your CentOS system to you Windows system is pure
    > FTP based and your subject mentions an FTP problem, what does this have
    > to do with SSH? I think your Subject is misleading ..
    >
    > > [..] Now I put some files in the
    > > Windows machine. After some time the connection to the CentOS machine
    > > is lost and I can't connect anymore to the CentOS machine. [..]

    >
    > And this is from the host from where you connected to your CentOS system?
    >
    > For the stability for you connection you can try experimenting with
    > (keep)Alive settings, see "man ssh" and "man sshd_config" for more
    > details, but this shouldn't fix the lockout problem.
    >
    > I don't see any relation between the FTP connection and the SSH
    > connection, other that that your experience is probably that your SSH
    > connection only terminates when you use FTP to another system (is this
    > true?).
    >
    > If you only experience problems with FTP'ing big files (to a Windows
    > box), the only thing I can think about is that only NTFS can cope with
    > files bigger as 4 GB, but that should only stall or abort your FTP
    > connection.
    >
    > What's interesting to know is if:
    >
    > - your FTP connection terminates first (if it terminates) before your
    > SSH connection terminates?
    > - you FTP connection dies after your SSH connection dies?
    > - you see your old shell/ssh proces still active on the server after the
    > connection gets lost?
    >
    > > [..] I tried to
    > > restart sshd, network and iptable scripts. No way. I'm locked out. If
    > > I login to the CentOS with the interactive console, [..]

    >
    > Just curious, before using the the interactive console, how do you
    > restart sshd when you're locked out?
    >
    > > [..] I can see sshd is
    > > running and is not blocked (I can do "ssh localhost" without
    > > problems). What can it be? Something related to security or something?

    >
    > Try connecting to your network interface's IP address, although I'm not
    > sure if the kernel would still use the loopback interface. Try
    > connecting from another box (your Windows box comes to mind), to see if
    > it's only the machine you started on is locked out, or any host.
    >
    > Curious again: how do you solve it now? Reboot the CentOS system?
    >
    > --
    > Regards,
    > Harrie



  4. Re: FTP connection locks me out

    cold80 wrote:
    > I installed CentOS 5.1. With the default installation the only opened
    > port is 22 and SSH is configured to accept connections. I login to the
    > system, do a lot of stuff, work with X (using NX), install rpms, etc.
    > I have even installed XEN without problems. Now, I would like to
    > transfer some big files (8 GB each) from CentOS to a Windows machine.
    > Just to make it easy I login to CentOS using ssh and I connect from
    > CentOS to the Windows machine using FTP. Now I put some files in the
    > Windows machine. After some time the connection to the CentOS machine
    > is lost and I can't connect anymore to the CentOS machine. I tried to
    > restart sshd, network and iptable scripts. No way. I'm locked out. If
    > I login to the CentOS with the interactive console, I can see sshd is
    > running and is not blocked (I can do "ssh localhost" without
    > problems). What can it be? Something related to security or something?
    >
    > Thank you in advance for your help
    >
    > Cold


    I've no idea what is blocking you: it sounds like a network problem between your client and your CentOS server. But can you use the "screen" utility to run your FTP inside a re-connectable session?

  5. Re: FTP connection locks me out

    cold80 wrote:

    > [..] Actually I'm thinking there's
    > a problem with iptable, so as soon as I can I will try to disable
    > iptable or removing all the rules set on it. [..]


    Or set a new rule which enables SSH on top of the other rules (iptables
    -I INPUT 1 ...), that way this rule should be read (and used!) before
    another rule. This will be more secure as disabling all rules ..

    > [..] Anyway, even if it was a
    > problem of firewall, I can't understand why it's happening after a
    > while...


    Neither can't I from here, but iptables has some mechanisms to chech how
    many times a rule is being hit from an IP address, so it could be one of
    those features which blocks you after a while (this is mostly used for
    new connections, not existing once, so this should (in theory) not be
    your problem, but you might check it).

    Another way to go would be to let iptables log more stuff so you can see
    what's going on.

    Anyway, this newsgroup is not about iptables, so I'll get back to SSH:

    You might want to enable logging or use verbose mode when connection
    with SSH and see what it mentions when your connection goes down.

    --
    Regards,
    Harrie

+ Reply to Thread