I found a related thread that describes how to login to a remote server using sshpass
:
sshpass -p '<password>' <ssh/scp command>
How can logging in with password be accomplished in Emacs / Tramp?
I presently use the following and then enter the password manually:
C-x C-f /ssh:user@server:/home/user/public_html/
I have the following function, that I access from my right-click context pop-up menu:
(defun lawlist-remote-server-login ()
(interactive)
(find-file "/ssh:user@server:/home/user/public_html/"))
If you're simply trying to avoid typing your password, but you don't want to use SSH keys, you can use an authentication file.
From the TRAMP user manual:
Edit:
The specific code that worked for the OP without requiring GnuPG is reproduced below.
Emacs configuration:
And in the
.authinfo
file identified above: