diff options
| author | Michael Albinus | 2019-09-20 11:27:49 +0200 |
|---|---|---|
| committer | Michael Albinus | 2019-09-20 11:27:49 +0200 |
| commit | 828233009a8c8dcbf58a561ca8fd06bd53198974 (patch) | |
| tree | a9535b4b3d63bcb4f1ecc9b98dd2a72178ac5df3 /doc | |
| parent | a6894cf0c32c0cc50f1a45cb51117ce01446d666 (diff) | |
| download | emacs-828233009a8c8dcbf58a561ca8fd06bd53198974.tar.gz emacs-828233009a8c8dcbf58a561ca8fd06bd53198974.zip | |
Some Tramp methods allow to change the remote login shell
* doc/misc/tramp.texi (Inline methods) <sshx, plink, plinkx>:
(External methods) <scpx, pscp, psftp>: Mention, that the remote
login shell could be changed.
(Remote shell setup): Remove description of properties
"remote-shell-login" and "remote-shell-args", they don't matter
here. Changing the default remote shell works only for some
methods.
(Frequently Asked Questions): Refer to alternative approach fixing
zsh problems.
* etc/NEWS: Some Tramp methods allow to change the remote login shell.
* lisp/net/tramp-sh.el (tramp-default-remote-shell): New defconst.
(tramp-methods): Use it.
(tramp-get-sh-extra-args): New defun.
(tramp-open-shell, tramp-maybe-open-connection): Use it.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/tramp.texi | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 1ed334b6bde..1440521df56 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -805,7 +805,8 @@ behavior. | |||
| 805 | 805 | ||
| 806 | Works like @option{ssh} but without the extra authentication prompts. | 806 | Works like @option{ssh} but without the extra authentication prompts. |
| 807 | @option{sshx} uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} | 807 | @option{sshx} uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} |
| 808 | to open a connection with a ``standard'' login shell. | 808 | to open a connection with a ``standard'' login shell. It supports to |
| 809 | change the remote login shell @command{/bin/sh}. | ||
| 809 | 810 | ||
| 810 | @strong{Note} that @option{sshx} does not bypass authentication | 811 | @strong{Note} that @option{sshx} does not bypass authentication |
| 811 | questions. For example, if the host key of the remote host is not | 812 | questions. For example, if the host key of the remote host is not |
| @@ -841,7 +842,8 @@ This is another method from the Kerberos suite. It behaves like @option{su}. | |||
| 841 | 842 | ||
| 842 | @option{plink} method is for MS Windows users with the PuTTY | 843 | @option{plink} method is for MS Windows users with the PuTTY |
| 843 | implementation of SSH@. It uses @samp{plink -ssh} to log in to the | 844 | implementation of SSH@. It uses @samp{plink -ssh} to log in to the |
| 844 | remote host. | 845 | remote host. It supports to change the remote login shell |
| 846 | @command{/bin/sh}. | ||
| 845 | 847 | ||
| 846 | Check the @samp{Share SSH connections if possible} control for that | 848 | Check the @samp{Share SSH connections if possible} control for that |
| 847 | session. | 849 | session. |
| @@ -854,7 +856,8 @@ session. | |||
| 854 | 856 | ||
| 855 | Another method using PuTTY on MS Windows with session names instead of | 857 | Another method using PuTTY on MS Windows with session names instead of |
| 856 | host names. @option{plinkx} calls @samp{plink -load @var{session} | 858 | host names. @option{plinkx} calls @samp{plink -load @var{session} |
| 857 | -t}. User names and port numbers must be defined in the session. | 859 | -t}. User names and port numbers must be defined in the session. It |
| 860 | supports to change the remote login shell @command{/bin/sh}. | ||
| 858 | 861 | ||
| 859 | Check the @samp{Share SSH connections if possible} control for that | 862 | Check the @samp{Share SSH connections if possible} control for that |
| 860 | session. | 863 | session. |
| @@ -928,7 +931,8 @@ This method supports the @samp{-p} argument. | |||
| 928 | 931 | ||
| 929 | @option{scpx} is useful to avoid login shell questions. It is similar | 932 | @option{scpx} is useful to avoid login shell questions. It is similar |
| 930 | in performance to @option{scp}. @option{scpx} uses @samp{ssh -t -t | 933 | in performance to @option{scp}. @option{scpx} uses @samp{ssh -t -t |
| 931 | @var{host} -l @var{user} /bin/sh} to open a connection. | 934 | @var{host} -l @var{user} /bin/sh} to open a connection. It supports |
| 935 | to change the remote login shell @command{/bin/sh}. | ||
| 932 | 936 | ||
| 933 | @option{scpx} is useful for MS Windows users when @command{ssh} | 937 | @option{scpx} is useful for MS Windows users when @command{ssh} |
| 934 | triggers an error about allocating a pseudo tty. This happens due to | 938 | triggers an error about allocating a pseudo tty. This happens due to |
| @@ -952,6 +956,8 @@ use the @command{plink} command to connect to the remote host, and | |||
| 952 | they use @command{pscp} or @command{psftp} for transferring the files. | 956 | they use @command{pscp} or @command{psftp} for transferring the files. |
| 953 | These programs are part of PuTTY, an SSH implementation for MS Windows. | 957 | These programs are part of PuTTY, an SSH implementation for MS Windows. |
| 954 | 958 | ||
| 959 | They support to change the remote login shell @command{/bin/sh}. | ||
| 960 | |||
| 955 | Check the @samp{Share SSH connections if possible} control for that | 961 | Check the @samp{Share SSH connections if possible} control for that |
| 956 | session. | 962 | session. |
| 957 | 963 | ||
| @@ -2100,12 +2106,10 @@ be recomputed. To force @value{tramp} to recompute afresh, call | |||
| 2100 | @cindex zsh setup | 2106 | @cindex zsh setup |
| 2101 | 2107 | ||
| 2102 | Per default, @value{tramp} uses the command @command{/bin/sh} for | 2108 | Per default, @value{tramp} uses the command @command{/bin/sh} for |
| 2103 | strting a shell on the remote host. This can be changed by setting | 2109 | starting a shell on the remote host. This can be changed by setting |
| 2104 | the connection property @option{remote-shell}, see @xref{Predefined | 2110 | the connection property @option{remote-shell}, see @xref{Predefined |
| 2105 | connection information}. Other properties might be adapted as well, | 2111 | connection information}. If you want, for example, use |
| 2106 | like @option{remote-shell-login} or @option{remote-shell-args}. If | 2112 | @command{/usr/bin/zsh} on a remote host, you might apply |
| 2107 | you want, for example, use @command{/usr/bin/zsh} on a remote host, | ||
| 2108 | you might apply | ||
| 2109 | 2113 | ||
| 2110 | @lisp | 2114 | @lisp |
| 2111 | @group | 2115 | @group |
| @@ -2115,6 +2119,11 @@ you might apply | |||
| 2115 | @end group | 2119 | @end group |
| 2116 | @end lisp | 2120 | @end lisp |
| 2117 | 2121 | ||
| 2122 | This works only for connection methods which allow to override the | ||
| 2123 | remote login shell, like @option{sshx} or @option{plink}. See | ||
| 2124 | @ref{Inline methods} and @ref{External methods} for connection methods | ||
| 2125 | which support this. | ||
| 2126 | |||
| 2118 | This approach has also the advantage, that settings in | 2127 | This approach has also the advantage, that settings in |
| 2119 | @code{tramp-sh-extra-args} will be applied. For zsh, the trouble | 2128 | @code{tramp-sh-extra-args} will be applied. For zsh, the trouble |
| 2120 | with the shell prompt due to set zle options will be avoided. | 2129 | with the shell prompt due to set zle options will be avoided. |
| @@ -3766,6 +3775,9 @@ This uses the default value of @code{tramp-terminal-type}, | |||
| 3766 | you want to use another value for @env{TERM}, change | 3775 | you want to use another value for @env{TERM}, change |
| 3767 | @code{tramp-terminal-type} and this line accordingly. | 3776 | @code{tramp-terminal-type} and this line accordingly. |
| 3768 | 3777 | ||
| 3778 | Alternatively, you could set the remote login shell explicitly. See | ||
| 3779 | @ref{Remote shell setup} for discussing this technique, | ||
| 3780 | |||
| 3769 | When using fish shell on remote hosts, disable fancy formatting by | 3781 | When using fish shell on remote hosts, disable fancy formatting by |
| 3770 | adding the following to @file{~/.config/fish/config.fish}: | 3782 | adding the following to @file{~/.config/fish/config.fish}: |
| 3771 | 3783 | ||