I usually connect to a machine through SSH and using ssh.el. I defined a command so I can do this quickly:
(defun ssh-me()
(interactive)
(ssh "myuser@myhost"))
After that, the mini-buffer asks me for the password and everything works fine. I am wondering if there is a way to set my password in my function so I don't have to write it every time I want to connect to that machine, so I would have something like:
(defun ssh-me()
(interactive)
(ssh "myuser@myhost")
(send-password-to-minibuffer "mypasswd"))
Is that possible?
Here is an example using a small custom file that is not encrypted. In this example, the filename is
.authinfo_iphoneand it contains just one line -- I use it to connect to my jailbroken iphone via ssh:Then, I use a small function to connect:
You could also use an external utility such as
sshpassand then write-up a function -- the command-line looks like:And here is an example function that incorporates that command line to log-in to the iPhone over ssh. It contemplates there is already an open shell-mode buffer with the process named
*shell*.