Autossh after powerfailuer
up vote
0
down vote
favorite
In the case of autossh what happens in the following situation:
- if there is a powercut and on reboot an internet connection is down how does autossh handle when the internet connection returns?
The docs say the following:
There is a "starting gate" time. If the first ssh process fails within
the first few
seconds of being started, autossh assumes that it never made it "out of the starting
gate", and exits. This is to handle initial failed authentication, connection, etc.
This time is 30 seconds by default, and can be adjusted (see the AUTOSSH_GATETIME
environment variable below). If AUTOSSH_GATETIME is set to 0, then both behaviours
are disabled: there is no "starting gate", and autossh will restart even if ssh
fails on the first run with an exit status of 1. The "starting gate" time is also
set to 0 when the -f flag to autossh is used.
Or is there a recommended way to handle this case?
// run file => autossh-owncloud.service
[Unit]
Description=AutoSSH owncloud service
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 30" -NT -R8080:localhost:80 user@server
[Install]
WantedBy=multi-user.target
// Run and run at boot commands used
sudo systemctl start autossh-owncloud.service
sudo systemctl enable autossh-owncloud.service
ssh autossh
add a comment |
up vote
0
down vote
favorite
In the case of autossh what happens in the following situation:
- if there is a powercut and on reboot an internet connection is down how does autossh handle when the internet connection returns?
The docs say the following:
There is a "starting gate" time. If the first ssh process fails within
the first few
seconds of being started, autossh assumes that it never made it "out of the starting
gate", and exits. This is to handle initial failed authentication, connection, etc.
This time is 30 seconds by default, and can be adjusted (see the AUTOSSH_GATETIME
environment variable below). If AUTOSSH_GATETIME is set to 0, then both behaviours
are disabled: there is no "starting gate", and autossh will restart even if ssh
fails on the first run with an exit status of 1. The "starting gate" time is also
set to 0 when the -f flag to autossh is used.
Or is there a recommended way to handle this case?
// run file => autossh-owncloud.service
[Unit]
Description=AutoSSH owncloud service
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 30" -NT -R8080:localhost:80 user@server
[Install]
WantedBy=multi-user.target
// Run and run at boot commands used
sudo systemctl start autossh-owncloud.service
sudo systemctl enable autossh-owncloud.service
ssh autossh
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In the case of autossh what happens in the following situation:
- if there is a powercut and on reboot an internet connection is down how does autossh handle when the internet connection returns?
The docs say the following:
There is a "starting gate" time. If the first ssh process fails within
the first few
seconds of being started, autossh assumes that it never made it "out of the starting
gate", and exits. This is to handle initial failed authentication, connection, etc.
This time is 30 seconds by default, and can be adjusted (see the AUTOSSH_GATETIME
environment variable below). If AUTOSSH_GATETIME is set to 0, then both behaviours
are disabled: there is no "starting gate", and autossh will restart even if ssh
fails on the first run with an exit status of 1. The "starting gate" time is also
set to 0 when the -f flag to autossh is used.
Or is there a recommended way to handle this case?
// run file => autossh-owncloud.service
[Unit]
Description=AutoSSH owncloud service
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 30" -NT -R8080:localhost:80 user@server
[Install]
WantedBy=multi-user.target
// Run and run at boot commands used
sudo systemctl start autossh-owncloud.service
sudo systemctl enable autossh-owncloud.service
ssh autossh
In the case of autossh what happens in the following situation:
- if there is a powercut and on reboot an internet connection is down how does autossh handle when the internet connection returns?
The docs say the following:
There is a "starting gate" time. If the first ssh process fails within
the first few
seconds of being started, autossh assumes that it never made it "out of the starting
gate", and exits. This is to handle initial failed authentication, connection, etc.
This time is 30 seconds by default, and can be adjusted (see the AUTOSSH_GATETIME
environment variable below). If AUTOSSH_GATETIME is set to 0, then both behaviours
are disabled: there is no "starting gate", and autossh will restart even if ssh
fails on the first run with an exit status of 1. The "starting gate" time is also
set to 0 when the -f flag to autossh is used.
Or is there a recommended way to handle this case?
// run file => autossh-owncloud.service
[Unit]
Description=AutoSSH owncloud service
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 30" -NT -R8080:localhost:80 user@server
[Install]
WantedBy=multi-user.target
// Run and run at boot commands used
sudo systemctl start autossh-owncloud.service
sudo systemctl enable autossh-owncloud.service
ssh autossh
ssh autossh
edited Nov 20 at 14:28
asked Nov 20 at 14:23
denski
209211
209211
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094538%2fautossh-after-powerfailuer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown