While working with emacs tramp term is the best solution to make some changes on remote files. I have been using it. For a long time.
It’s easy to connect after M-x tramp-term command root@ip but if you want to connect to server with non-default port like 2222
For this you have to create or edit:
1 |
emacs ~/.ssh/config |
then add information of a server
1 2 3 4 |
Host host1 HostName 10.1.1.10 or example.com User USER Port 2222 |
than open emacs use tramp term just write host1 and enter
Also, you can connect to server by using just ssh host1 from your terminal
That’s it.
For more
- http://emacs.stackexchange.com/questions/7172/transparently-find-file-over-ssh-in-shell-directory
- I find exact solution from here
- http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/
- At there are some examples about ~/.ssh/config
- It can be useful while using;
- Vagrant
- Docker
- AWS
- Openstack
connection with identity(key) file
- https://www.emacswiki.org/emacs/TrampMode#toc26
- I don’t know why default manual doesn’t help me