Opening many tunnels typing the password only once (all accounts in gateways have the same pass)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












I want to open many tunnels at once, they all have the same long password.



With -f, i.e.,



ssh -fN -p 22 usr1@gate1 -L 10001:ip1:22
ssh -fN -p 22 usr2@gate2 -L 10002:ip2:22
...
ssh -fN -p 22 usrn@gaten -L 1000n:ipn:22


I can open the tunnels in background, which allows me to run them all together and then just type consecutively the password as many times as the number of tunnels I am opening (n).



Given that what I type is the same, I would like to find a way to type it just once, but still do it in a secure way.







share|improve this question















  • 4




    use password less ogin with key, then have a look at ssh-agent. or use sshpass
    – Archemar
    Jun 25 at 11:17










  • Set up public/private key based login.
    – ctrl-alt-delor
    Jun 25 at 13:06










  • @Archemar I want to put the password explicitly, but only once. You are instead suggesting to install the keys and login without password right?
    – myradio
    Jun 29 at 12:55










  • sshpass will help you, but password will appear in ps -ef result. password can be set to keys but you must allow for login without password. That why I reply as comment, I see no way you can do that, but maybe someone will be more clever than me.
    – Archemar
    Jun 29 at 14:07














up vote
1
down vote

favorite
1












I want to open many tunnels at once, they all have the same long password.



With -f, i.e.,



ssh -fN -p 22 usr1@gate1 -L 10001:ip1:22
ssh -fN -p 22 usr2@gate2 -L 10002:ip2:22
...
ssh -fN -p 22 usrn@gaten -L 1000n:ipn:22


I can open the tunnels in background, which allows me to run them all together and then just type consecutively the password as many times as the number of tunnels I am opening (n).



Given that what I type is the same, I would like to find a way to type it just once, but still do it in a secure way.







share|improve this question















  • 4




    use password less ogin with key, then have a look at ssh-agent. or use sshpass
    – Archemar
    Jun 25 at 11:17










  • Set up public/private key based login.
    – ctrl-alt-delor
    Jun 25 at 13:06










  • @Archemar I want to put the password explicitly, but only once. You are instead suggesting to install the keys and login without password right?
    – myradio
    Jun 29 at 12:55










  • sshpass will help you, but password will appear in ps -ef result. password can be set to keys but you must allow for login without password. That why I reply as comment, I see no way you can do that, but maybe someone will be more clever than me.
    – Archemar
    Jun 29 at 14:07












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I want to open many tunnels at once, they all have the same long password.



With -f, i.e.,



ssh -fN -p 22 usr1@gate1 -L 10001:ip1:22
ssh -fN -p 22 usr2@gate2 -L 10002:ip2:22
...
ssh -fN -p 22 usrn@gaten -L 1000n:ipn:22


I can open the tunnels in background, which allows me to run them all together and then just type consecutively the password as many times as the number of tunnels I am opening (n).



Given that what I type is the same, I would like to find a way to type it just once, but still do it in a secure way.







share|improve this question











I want to open many tunnels at once, they all have the same long password.



With -f, i.e.,



ssh -fN -p 22 usr1@gate1 -L 10001:ip1:22
ssh -fN -p 22 usr2@gate2 -L 10002:ip2:22
...
ssh -fN -p 22 usrn@gaten -L 1000n:ipn:22


I can open the tunnels in background, which allows me to run them all together and then just type consecutively the password as many times as the number of tunnels I am opening (n).



Given that what I type is the same, I would like to find a way to type it just once, but still do it in a secure way.









share|improve this question










share|improve this question




share|improve this question









asked Jun 25 at 10:43









myradio

1885




1885







  • 4




    use password less ogin with key, then have a look at ssh-agent. or use sshpass
    – Archemar
    Jun 25 at 11:17










  • Set up public/private key based login.
    – ctrl-alt-delor
    Jun 25 at 13:06










  • @Archemar I want to put the password explicitly, but only once. You are instead suggesting to install the keys and login without password right?
    – myradio
    Jun 29 at 12:55










  • sshpass will help you, but password will appear in ps -ef result. password can be set to keys but you must allow for login without password. That why I reply as comment, I see no way you can do that, but maybe someone will be more clever than me.
    – Archemar
    Jun 29 at 14:07












  • 4




    use password less ogin with key, then have a look at ssh-agent. or use sshpass
    – Archemar
    Jun 25 at 11:17










  • Set up public/private key based login.
    – ctrl-alt-delor
    Jun 25 at 13:06










  • @Archemar I want to put the password explicitly, but only once. You are instead suggesting to install the keys and login without password right?
    – myradio
    Jun 29 at 12:55










  • sshpass will help you, but password will appear in ps -ef result. password can be set to keys but you must allow for login without password. That why I reply as comment, I see no way you can do that, but maybe someone will be more clever than me.
    – Archemar
    Jun 29 at 14:07







4




4




use password less ogin with key, then have a look at ssh-agent. or use sshpass
– Archemar
Jun 25 at 11:17




use password less ogin with key, then have a look at ssh-agent. or use sshpass
– Archemar
Jun 25 at 11:17












Set up public/private key based login.
– ctrl-alt-delor
Jun 25 at 13:06




Set up public/private key based login.
– ctrl-alt-delor
Jun 25 at 13:06












@Archemar I want to put the password explicitly, but only once. You are instead suggesting to install the keys and login without password right?
– myradio
Jun 29 at 12:55




@Archemar I want to put the password explicitly, but only once. You are instead suggesting to install the keys and login without password right?
– myradio
Jun 29 at 12:55












sshpass will help you, but password will appear in ps -ef result. password can be set to keys but you must allow for login without password. That why I reply as comment, I see no way you can do that, but maybe someone will be more clever than me.
– Archemar
Jun 29 at 14:07




sshpass will help you, but password will appear in ps -ef result. password can be set to keys but you must allow for login without password. That why I reply as comment, I see no way you can do that, but maybe someone will be more clever than me.
– Archemar
Jun 29 at 14:07















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451732%2fopening-many-tunnels-typing-the-password-only-once-all-accounts-in-gateways-hav%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451732%2fopening-many-tunnels-typing-the-password-only-once-all-accounts-in-gateways-hav%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay