Setting own connection related information
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 can also be any property found in tramp-persistency-file-name.
4.16.1 Relevant connection properties to override
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 oftramp-sh.el."login-args""login-args"specifies a list of lists of arguments to pass to"login-program". Read the docstring oftramp-methodshow 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, likeksh, prefer"-"."session-timeout"All
tramp-sh.elbased 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 ofnildisables this feature. Most of the methods do not set this property except thesudo,doasandrun0methods, 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,rcloneandsshfs. 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 theadbandandroidsumethods,"/C$/Temp"for thesmbmethod, and"/tmp"otherwise. Where temporary files are kept."posix"Connections using the
smbmethod 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 tonil.The default value of this property is
t(not specified intramp-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 intramp-methods). Where temporary files are kept."mount-args""copyto-args""moveto-args""about-args"These properties keep optional flags to the different
rcloneoperations. See their default values intramp-methodsif you want to change their values.