How to manually supply passphrase to autossh, preferably on login
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I want to run a bash script (as root) that among other things establishes reverse SSH tunnel using autossh
. The SSH key has a passphrase.
Ideally I would like to have to login as root in terminal and the passphrase would be retrieved from a keyring (the computer has Gnome), or something like this, and supplied to
autossh
(if needs be I can set SSH passphrase and the root password to be the same).If #1 is absolutely impossible I can do two things - (a) login and (b) run
ssh-agent /bin/bash
and then provide the passphrasessh-add
.
However even manual input of the passphrase as mentioned in #2 doesn't work.
If I run ssh-agent/ssh-add
(as mentioned above), SSH itself works:ssh -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
But:autossh -M 7777 -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
doesn't work.
How can I troubleshoot #2 and then ideally implement also #1?
linux ssh networking ssh-tunneling gnome-keyring
add a comment |Â
up vote
0
down vote
favorite
I want to run a bash script (as root) that among other things establishes reverse SSH tunnel using autossh
. The SSH key has a passphrase.
Ideally I would like to have to login as root in terminal and the passphrase would be retrieved from a keyring (the computer has Gnome), or something like this, and supplied to
autossh
(if needs be I can set SSH passphrase and the root password to be the same).If #1 is absolutely impossible I can do two things - (a) login and (b) run
ssh-agent /bin/bash
and then provide the passphrasessh-add
.
However even manual input of the passphrase as mentioned in #2 doesn't work.
If I run ssh-agent/ssh-add
(as mentioned above), SSH itself works:ssh -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
But:autossh -M 7777 -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
doesn't work.
How can I troubleshoot #2 and then ideally implement also #1?
linux ssh networking ssh-tunneling gnome-keyring
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to run a bash script (as root) that among other things establishes reverse SSH tunnel using autossh
. The SSH key has a passphrase.
Ideally I would like to have to login as root in terminal and the passphrase would be retrieved from a keyring (the computer has Gnome), or something like this, and supplied to
autossh
(if needs be I can set SSH passphrase and the root password to be the same).If #1 is absolutely impossible I can do two things - (a) login and (b) run
ssh-agent /bin/bash
and then provide the passphrasessh-add
.
However even manual input of the passphrase as mentioned in #2 doesn't work.
If I run ssh-agent/ssh-add
(as mentioned above), SSH itself works:ssh -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
But:autossh -M 7777 -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
doesn't work.
How can I troubleshoot #2 and then ideally implement also #1?
linux ssh networking ssh-tunneling gnome-keyring
I want to run a bash script (as root) that among other things establishes reverse SSH tunnel using autossh
. The SSH key has a passphrase.
Ideally I would like to have to login as root in terminal and the passphrase would be retrieved from a keyring (the computer has Gnome), or something like this, and supplied to
autossh
(if needs be I can set SSH passphrase and the root password to be the same).If #1 is absolutely impossible I can do two things - (a) login and (b) run
ssh-agent /bin/bash
and then provide the passphrasessh-add
.
However even manual input of the passphrase as mentioned in #2 doesn't work.
If I run ssh-agent/ssh-add
(as mentioned above), SSH itself works:ssh -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
But:autossh -M 7777 -f -N -T -R 8888:localhost:22 -p 9999 tunnel@example.org
doesn't work.
How can I troubleshoot #2 and then ideally implement also #1?
linux ssh networking ssh-tunneling gnome-keyring
asked May 3 at 8:46
user1876484
438
438
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f441490%2fhow-to-manually-supply-passphrase-to-autossh-preferably-on-login%23new-answer', 'question_page');
);
Post as a guest
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
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
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