ConnectionAttempts question - SSH

This is a discussion on ConnectionAttempts question - SSH ; Hi! I want to make a TCP forwarding for a MySQL database. To connect to a database that is in 192.168.2.1, I do this: ssh -f -L 20000:192.168.2.1:3306 -o 'StrictHostKeyChecking no' username@localhost -N This works without any problem. But if ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ConnectionAttempts question

  1. ConnectionAttempts question

    Hi!

    I want to make a TCP forwarding for a MySQL database. To connect to a
    database that is in 192.168.2.1, I do this:

    ssh -f -L 20000:192.168.2.1:3306 -o 'StrictHostKeyChecking no'
    username@localhost -N

    This works without any problem. But if I disconnect my computer from
    the local network, I lose the TCP forwarding. I've been reading about
    this and I find this option: 'ConnectionAttempts'. Using this option I
    can set how many tries to make before exiting. I would like to know if
    'ConnectionAttempts' can be [INFINITE] or something similar, so it'll
    try continuously until I connect the computer again to the network.

    Thanks for your help!


  2. Re: ConnectionAttempts question

    Ok, autossh will do the work for me


    Perro Flaco ha escrito:

    > Hi!
    >
    > I want to make a TCP forwarding for a MySQL database. To connect to a
    > database that is in 192.168.2.1, I do this:
    >
    > ssh -f -L 20000:192.168.2.1:3306 -o 'StrictHostKeyChecking no'
    > username@localhost -N
    >
    > This works without any problem. But if I disconnect my computer from
    > the local network, I lose the TCP forwarding. I've been reading about
    > this and I find this option: 'ConnectionAttempts'. Using this option I
    > can set how many tries to make before exiting. I would like to know if
    > 'ConnectionAttempts' can be [INFINITE] or something similar, so it'll
    > try continuously until I connect the computer again to the network.
    >
    > Thanks for your help!



+ Reply to Thread