D
D
demortall2022-01-15 15:15:59
linux
demortall, 2022-01-15 15:15:59

How to make a shortcut to connect ssh with a password?

I searched on Google, I tried it myself, but sh did not start

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2022-01-15
@demortall

there is a sshpass utility, example: carefully, they write that at least sshpass is trying to hide the password on this machine from other users, you can still somehow pull it out of the command line , you can use the -f key, then the password will be taken from the file, the rights to which should be configured only for the current user ps I strongly recommend setting up passwordless authorization based on rsa / dsa asymmetric encryption, it's a couple of manual steps, but there will be no problems (sshpass will almost certainly have problems with redirecting streams to ssh)
sshpass -p "password" ssh [email protected]

A
AlexVWill, 2022-01-16
@AlexVWill

I recommend setting up passwordless authorization

All the same, passwordless authorization probably means not the absence of a password as such, but authorization by keys, but it is better to protect the key itself with a password...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question