The following is an excerpt from the Quick Start Guide for Tramp, which is built-in to Emacs 26:
https://www.gnu.org/software/emacs/manual/html_node/tramp/Quick-Start-Guide.html
Tramp extends the Emacs file name syntax by a remote component. A remote file
name looks always like /method:user@host:/path/to/file.
You can use remote files exactly like ordinary files, that means you could open
a file or directory by C-x C-f /method:user@host:/path/to/file <RET>, edit the
file, and save it. You can also mix local files and remote files in file
operations with two arguments, like copy-file or rename-file. And finally, you
can run even processes on a remote host, when the buffer you call the process
from has a remote default-directory.
The O.P. has indicated in a comment that using /method:user@host:/path/to/file
has resolved the issue.
Example using ssh
and a non-standard port (2222) to connect to the root default directory:
/ssh:user@host#2222:
Example using ssh
to open a file with a non-standard port (2222):
/ssh:user@host#2222:/path/to/file
Here is an example to connect to the root default directory using eshell
with a non-standard port (2222):
(let ((default-directory "/ssh:user@host#2222:"))
(eshell))
Here is an example to connect to the root default directory using shell
with a non-standard port (2222):
(let ((default-directory "/ssh:user@host#2222:"))
(shell))
To login automatically using an .authinfo
file, here is a sample entry in that file:
machine HOST login USER password PWD
To assist with logging in automatically with a non-standard port (2222), one can use an appropriate entry in the ~/.ssh/config
file, which can include other attributes; e.g., HostName and User. https://emacs.stackexchange.com/a/31339/2287
Host 12.34.567.89
Port 2222
/ssh:username@server#port:
. E.g.,/ssh:hello@world.com#2222:
and that logs in to my root home directory on the shared server in cyberspace at the following path in the top of thedired-mode
buffer:/ssh:hello@world.com#2222:/home3/hello:
The developer who produces the Emacs binary app package on Emacs for OSX stopped producing builds for OSX 10.6.8 after Emacs 26.1, so that is the only build I can test from his website. – lawlist Feb 15 '20 at 17:03/ssh:hello@world.com#2222:/home3/hello/.spamassassin/user_prefs
In this case, I opened the file nameduser_prefs
inside the spamassassin folder. I would imagine Tramp uses a default port other than2222
and that is why I must also specify the desired port, but I don't remember where I asked that particular question -- probably a few years ago.... – lawlist Feb 15 '20 at 17:08shell
oreshell
using Tramp on Emacs 26.1 built by Emacs for OSX:(let ((default-directory "/ssh:hello@world.com#2222:")) (eshell))
or(let ((default-directory "/ssh:hello@world.com#2222:")) (shell))
.... If you want to setup an.authinfo
file to login automatically, here is an example entry in that file:machine 12.34.567.89 login username password abcdefg
Alternatively, one can use an appropriate entry in the~/.ssh/config
file to login automatically ... -- the entry in theconfig
can include a port number ... – lawlist Feb 15 '20 at 17:22ssh
to the TRAMP line i.e./ssh:myuname@myserver.com:
it worked out but the buffer and mini buffer all went blank, then after the connection was made the buffers returned back. Small glitch. – Terry Feb 15 '20 at 17:57update_window
..., and this results in screen update glitches. Since then, I think the master branch has undergone additional changes that are designed to help with screen update glitches, but I haven't played around with the master branch since mid-July of last year ... so, I'm not sure what new/problematic goodies are available there .... – lawlist Feb 15 '20 at 18:04