For more precise customization, parameters specified by
tramp-methods
can be overwritten manually.
Set tramp-connection-properties
to manually override
tramp-methods
. Properties in this list are in the form
(regexp property value)
. regexp
matches remote file names. Use nil
to match all.
property is the property’s name, and value is the
property’s value.
property is any method specific parameter contained in
tramp-methods
. The parameter key in tramp-methods
is a
symbol name tramp-<foo>
. To overwrite that property, use the
string "<foo>"
for property. For example, this changes the
remote shell:
(add-to-list 'tramp-connection-properties (list (regexp-quote "/ssh:user@randomhost.your.domain:") "remote-shell" "/bin/ksh"))
(add-to-list 'tramp-connection-properties (list (regexp-quote "/ssh:user@randomhost.your.domain:") "remote-shell-login" '("-")))
The parameters tramp-remote-shell
and
tramp-remote-shell-login
in tramp-methods
now have new
values for the remote host.
property could also be any property found in
tramp-persistency-file-name
.
Not all connection properties need to be changed. The most relevant properties are listed here:
"login-program"
The property "login-program"
stores the program to be used to
connect to the remote host. Sometimes, the program might have another
name on your host, or it might be located in another path. In this case,
you can overwrite the default value, which is special for every
connection method. It is used in all connection methods of
tramp-sh.el.
"login-args"
"login-args"
specifies a list of lists of arguments to pass to
"login-program"
. Read the docstring of tramp-methods
how
to construct these lists.
"remote-shell"
This property tells TRAMP which remote shell to apply on the
remote host. It is used in all connection methods of
tramp-sh.el. The default value is "/bin/sh"
.
"remote-shell-login"
A property to be used in conjunction with "remote-shell"
. It
specifies, which shell argument triggers a login shell. Its default
value is "-l"
, but some shells, like ksh
, prefer
"-"
.
"session-timeout"
All tramp-sh.el based methods accept the property
"session-timeout"
. This is the time (in seconds) after a
connection is disabled for security reasons, and must be
reestablished. A value of nil
disables this feature. Most of
the methods do not set this property except the sudo and
doas methods, which use predefined values.
"~"
"~user"
This is the home directory on the remote host. Setting this connection property helps especially for methods which cannot expand to a remote home directory, like adb, rclone and sshfs. Expanding ~ to home directory for an example.
"tmpdir"
The temporary directory on the remote host. If not specified, the
default value is "/data/local/tmp"
for the adb method,
"/C$/Temp"
for the smb method, and "/tmp"
otherwise.
"direct-async-process"
When this property is non-nil
, an alternative, more performant
implementation of make-process
and start-file-process
is
applied. The connection method must also be marked with a
non-nil
tramp-direct-async
parameter in
tramp-methods
. Improving performance of asynchronous remote processes for a discussion of constraints.
"posix"
Connections using the smb method check, whether the remote
host supports posix commands. If the remote host runs Samba, it
confirms this capability. However, some very old Samba versions have
errors in their implementation. In order to suppress the posix
commands for those hosts, the property "posix"
should be set to
nil
.
The default value of this property is t
(not specified in
tramp-methods
). If the remote host runs native MS Windows,
this property has no effect.
"mount-point"
The directory file name an FUSE-based file system is mounted
on. The default value of this property is
"/tmp/tramp.method.user@host#port"
(not specified in
tramp-methods
).
"mount-args"
"copyto-args"
"moveto-args"
"about-args"
These properties keep optional flags to the different rclone
operations. See their default values in tramp-methods
if you
want to change their values.