SSH: password cache if SSH-keys are forbidden

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I have a server which I have to access frequently via ssh, because I compute on it.
Now, the computing center explicitly forbids SSH-keys because they are "insecure". They feel that typing my password, on a keyboard, everytime, possible in front of other humans, is a much safer way to login.
Now; I cannot change their minds (I tried).
Is there a way to at least temporarily store SSH passwords, the way GIT can store passwords in a cache for some defined time?
I'm on a linux machine.
linux ssh passwords ssh-keys
add a comment |Â
up vote
3
down vote
favorite
I have a server which I have to access frequently via ssh, because I compute on it.
Now, the computing center explicitly forbids SSH-keys because they are "insecure". They feel that typing my password, on a keyboard, everytime, possible in front of other humans, is a much safer way to login.
Now; I cannot change their minds (I tried).
Is there a way to at least temporarily store SSH passwords, the way GIT can store passwords in a cache for some defined time?
I'm on a linux machine.
linux ssh passwords ssh-keys
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have a server which I have to access frequently via ssh, because I compute on it.
Now, the computing center explicitly forbids SSH-keys because they are "insecure". They feel that typing my password, on a keyboard, everytime, possible in front of other humans, is a much safer way to login.
Now; I cannot change their minds (I tried).
Is there a way to at least temporarily store SSH passwords, the way GIT can store passwords in a cache for some defined time?
I'm on a linux machine.
linux ssh passwords ssh-keys
I have a server which I have to access frequently via ssh, because I compute on it.
Now, the computing center explicitly forbids SSH-keys because they are "insecure". They feel that typing my password, on a keyboard, everytime, possible in front of other humans, is a much safer way to login.
Now; I cannot change their minds (I tried).
Is there a way to at least temporarily store SSH passwords, the way GIT can store passwords in a cache for some defined time?
I'm on a linux machine.
linux ssh passwords ssh-keys
linux ssh passwords ssh-keys
asked 55 mins ago
user2667180
285
285
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Connection reuse
SSHv2 allows the same authenticated connection to establish multiple 'channels' â interactive shell, batch command, SFTP, along with the secondary ones such as agent-forwarding or TCP-forwarding. Your server probably supports connection multiplexing by default. (If your admins complain, it's not caching your password anywhere â it's caching the whole connection.)
With OpenSSH you have ControlMaster and ControlPath options (-M and -S) to make use of this:
Start a 'master' SSH connection using
-M. (Since you don't have a ControlPath in your config yet, you need to specify it in command line using-S. It needs to live long, so I add the-fNoptions to drop to background; they're technically optional otherwise.)$ ssh foo@bar.example.com -fNMS ~/.ssh/bar.socket
foo@bar.example.com's password:You're back to the local shell.
Start a new connection through the master:
$ ssh foo@bar.example.com -S ~/.ssh/bar.socketYou're in.
To make this useful for Git/rsync/SFTP, you need to set up
ControlPathin your configuration, because you won't be able to specify-Sall the time:Host *
ControlPath ~/.ssh/S.%r@%h:%p
You can automate this â recent OpenSSH versions also have ControlPersist which automatically establishes a master connection in background if there isn't one yet. This allows you to skip step 1 and just use ssh as you normally would.
Configuration in
~/.ssh/config:Host *
ControlPath ~/.ssh/S.%r@%h:%p
ControlMaster auto
ControlPersist 15mFirst connection asks for password:
$ ssh foo@bar.example.com
foo@bar.example.com's password:
[foo@bar:~]$ exitThe second doesn't:
$ ssh foo@bar.example.com
[foo@bar:~]$ yay
To control the multiplex master (stop it or configure TCP forwardings), use the -O option.
A similar method is supported by recent PuTTY versions.
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Connection reuse
SSHv2 allows the same authenticated connection to establish multiple 'channels' â interactive shell, batch command, SFTP, along with the secondary ones such as agent-forwarding or TCP-forwarding. Your server probably supports connection multiplexing by default. (If your admins complain, it's not caching your password anywhere â it's caching the whole connection.)
With OpenSSH you have ControlMaster and ControlPath options (-M and -S) to make use of this:
Start a 'master' SSH connection using
-M. (Since you don't have a ControlPath in your config yet, you need to specify it in command line using-S. It needs to live long, so I add the-fNoptions to drop to background; they're technically optional otherwise.)$ ssh foo@bar.example.com -fNMS ~/.ssh/bar.socket
foo@bar.example.com's password:You're back to the local shell.
Start a new connection through the master:
$ ssh foo@bar.example.com -S ~/.ssh/bar.socketYou're in.
To make this useful for Git/rsync/SFTP, you need to set up
ControlPathin your configuration, because you won't be able to specify-Sall the time:Host *
ControlPath ~/.ssh/S.%r@%h:%p
You can automate this â recent OpenSSH versions also have ControlPersist which automatically establishes a master connection in background if there isn't one yet. This allows you to skip step 1 and just use ssh as you normally would.
Configuration in
~/.ssh/config:Host *
ControlPath ~/.ssh/S.%r@%h:%p
ControlMaster auto
ControlPersist 15mFirst connection asks for password:
$ ssh foo@bar.example.com
foo@bar.example.com's password:
[foo@bar:~]$ exitThe second doesn't:
$ ssh foo@bar.example.com
[foo@bar:~]$ yay
To control the multiplex master (stop it or configure TCP forwardings), use the -O option.
A similar method is supported by recent PuTTY versions.
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
add a comment |Â
up vote
3
down vote
accepted
Connection reuse
SSHv2 allows the same authenticated connection to establish multiple 'channels' â interactive shell, batch command, SFTP, along with the secondary ones such as agent-forwarding or TCP-forwarding. Your server probably supports connection multiplexing by default. (If your admins complain, it's not caching your password anywhere â it's caching the whole connection.)
With OpenSSH you have ControlMaster and ControlPath options (-M and -S) to make use of this:
Start a 'master' SSH connection using
-M. (Since you don't have a ControlPath in your config yet, you need to specify it in command line using-S. It needs to live long, so I add the-fNoptions to drop to background; they're technically optional otherwise.)$ ssh foo@bar.example.com -fNMS ~/.ssh/bar.socket
foo@bar.example.com's password:You're back to the local shell.
Start a new connection through the master:
$ ssh foo@bar.example.com -S ~/.ssh/bar.socketYou're in.
To make this useful for Git/rsync/SFTP, you need to set up
ControlPathin your configuration, because you won't be able to specify-Sall the time:Host *
ControlPath ~/.ssh/S.%r@%h:%p
You can automate this â recent OpenSSH versions also have ControlPersist which automatically establishes a master connection in background if there isn't one yet. This allows you to skip step 1 and just use ssh as you normally would.
Configuration in
~/.ssh/config:Host *
ControlPath ~/.ssh/S.%r@%h:%p
ControlMaster auto
ControlPersist 15mFirst connection asks for password:
$ ssh foo@bar.example.com
foo@bar.example.com's password:
[foo@bar:~]$ exitThe second doesn't:
$ ssh foo@bar.example.com
[foo@bar:~]$ yay
To control the multiplex master (stop it or configure TCP forwardings), use the -O option.
A similar method is supported by recent PuTTY versions.
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Connection reuse
SSHv2 allows the same authenticated connection to establish multiple 'channels' â interactive shell, batch command, SFTP, along with the secondary ones such as agent-forwarding or TCP-forwarding. Your server probably supports connection multiplexing by default. (If your admins complain, it's not caching your password anywhere â it's caching the whole connection.)
With OpenSSH you have ControlMaster and ControlPath options (-M and -S) to make use of this:
Start a 'master' SSH connection using
-M. (Since you don't have a ControlPath in your config yet, you need to specify it in command line using-S. It needs to live long, so I add the-fNoptions to drop to background; they're technically optional otherwise.)$ ssh foo@bar.example.com -fNMS ~/.ssh/bar.socket
foo@bar.example.com's password:You're back to the local shell.
Start a new connection through the master:
$ ssh foo@bar.example.com -S ~/.ssh/bar.socketYou're in.
To make this useful for Git/rsync/SFTP, you need to set up
ControlPathin your configuration, because you won't be able to specify-Sall the time:Host *
ControlPath ~/.ssh/S.%r@%h:%p
You can automate this â recent OpenSSH versions also have ControlPersist which automatically establishes a master connection in background if there isn't one yet. This allows you to skip step 1 and just use ssh as you normally would.
Configuration in
~/.ssh/config:Host *
ControlPath ~/.ssh/S.%r@%h:%p
ControlMaster auto
ControlPersist 15mFirst connection asks for password:
$ ssh foo@bar.example.com
foo@bar.example.com's password:
[foo@bar:~]$ exitThe second doesn't:
$ ssh foo@bar.example.com
[foo@bar:~]$ yay
To control the multiplex master (stop it or configure TCP forwardings), use the -O option.
A similar method is supported by recent PuTTY versions.
Connection reuse
SSHv2 allows the same authenticated connection to establish multiple 'channels' â interactive shell, batch command, SFTP, along with the secondary ones such as agent-forwarding or TCP-forwarding. Your server probably supports connection multiplexing by default. (If your admins complain, it's not caching your password anywhere â it's caching the whole connection.)
With OpenSSH you have ControlMaster and ControlPath options (-M and -S) to make use of this:
Start a 'master' SSH connection using
-M. (Since you don't have a ControlPath in your config yet, you need to specify it in command line using-S. It needs to live long, so I add the-fNoptions to drop to background; they're technically optional otherwise.)$ ssh foo@bar.example.com -fNMS ~/.ssh/bar.socket
foo@bar.example.com's password:You're back to the local shell.
Start a new connection through the master:
$ ssh foo@bar.example.com -S ~/.ssh/bar.socketYou're in.
To make this useful for Git/rsync/SFTP, you need to set up
ControlPathin your configuration, because you won't be able to specify-Sall the time:Host *
ControlPath ~/.ssh/S.%r@%h:%p
You can automate this â recent OpenSSH versions also have ControlPersist which automatically establishes a master connection in background if there isn't one yet. This allows you to skip step 1 and just use ssh as you normally would.
Configuration in
~/.ssh/config:Host *
ControlPath ~/.ssh/S.%r@%h:%p
ControlMaster auto
ControlPersist 15mFirst connection asks for password:
$ ssh foo@bar.example.com
foo@bar.example.com's password:
[foo@bar:~]$ exitThe second doesn't:
$ ssh foo@bar.example.com
[foo@bar:~]$ yay
To control the multiplex master (stop it or configure TCP forwardings), use the -O option.
A similar method is supported by recent PuTTY versions.
edited 12 mins ago
answered 20 mins ago
grawity
219k32446512
219k32446512
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
add a comment |Â
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
thank you very much for this nice answer. google was not useful on this problem, as it always turned to ssh-keys and I did not know the right keywords. helped me a lot!
â user2667180
13 mins ago
add a comment |Â
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%2fsuperuser.com%2fquestions%2f1362894%2fssh-password-cache-if-ssh-keys-are-forbidden%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
