Following this tutorial will lead to have the following:
- Extremely easy SSH connection to servers using Emacs, to edit and manipulate files and folders.
tramp-mode allow us to create SSH connection with a remote server.
In Emacs we can execute
ido-find-file then write
This will open the root directory of the server. And since
dired-mode will work on a remote connection, we can create files and
folders and also manipulate them.
Making it effective
1 2 3 4 5
Now the file
~/.ssh/config will have following contents.
1 2 3 4 5 6 7
There we can add as many hosts as we want.
Now on next time we call
ido-find-file we just write
Create the following file
The contents of this file will be.
Now the password is on plain text, we want to avoid that.
epa-encrypt-file and select the
OK and set a password for decrypting the file.
You’ll end up with the following file
~/.authinfo.gpg, remove the
Emacs by default will search on this file to get passwords.
Next time we try to connect to a server Emacs will ask the password
~/.authinfo.gpg from which Emacs can take the
passwords to connect to the specified host.
tramp-mode and Projectile
does not play well together.
Add the following to your configuration to avoid that.
which-function-mode play bad with
tramp-mode as well.
I would suggest to use