I've to work a lot with SSH on different Servers where I'm not allowed to store a public Key on the remote Server. So i cant use SSH-Keys and SSH-Agent.
The Authentication is over LDAP so its always the same Password. I would like to enter my password once per Session which is then stored somewhere and use it for all further Connections.
I’ve searched a lot and the best way I could find is to store the Password in an environment Variable and use sshpass like:
SSHPASS=mypass
sshpass -e ssh username@servername
But I dont like the idea to know that my password is saved in an environment Variable. Is there a better way to do this?