That’s it, it works with something like this:
ssh user@0.0.0.0
hit enter and then I enter credentials, but when I try to use sshpass like this:
sshpass -p my_password ssh user@0.0.0.0
It does nothing, I don’t even get an error.
In fact, if I run openssh
or openssh-server
command it doesn’t find any order, and If I try to reinstall i get a message related to a config_manager complement before telling me that they are already installed.
Notice when you look at man sshpass
the synopsis shows -p*password*
and not -p *password*
. I wonder if the space following the -p is the problem.
Additionally, sshpass waits for a prompt before sending that password, and the man page tells about that as well.
Using sshpass to send a password for connecting is the most insecure way possible to connect with ssh. Have you considered using an ssh key for passwordless connections?
With all my systems I have set up the ssh key and can use both ssh and rsync without passwords to connect and transfer files between systems.