Sadly, the transfer method cannot be switched on the fly, instead you
must specify the right method in the file name.
+Kludgy feature: if HOST has the form \"xx#yy\", then yy is assumed to
+be a port number for ssh, and \"-p yy\" will be added to the list of
+arguments, and xx will be used as the host name to connect to.
+
* Actually, the rsh program to be used can be specified in the
method parameters, see the variable `tramp-methods'."
(save-match-data
(tramp-message 7 "Opening connection for %s@%s using %s..."
user host method)
(tramp-message 7 "Opening connection at %s using %s..." host method))
- (let ((process-environment (copy-sequence process-environment)))
+ (let ((process-environment (copy-sequence process-environment))
+ (bufnam (tramp-buffer-name multi-method method user host))
+ (buf (tramp-get-buffer multi-method method user host))
+ (rsh-program (tramp-get-rsh-program multi-method method))
+ (rsh-args (tramp-get-rsh-args multi-method method)))
+ ;; The following should be changed. We need a more general
+ ;; mechanism to parse extra host args.
+ (when (string-match "\\([^#]*\\)#\\(.*\\)" host)
+ (setq rsh-args (cons "-p" (cons (match-string 2 host) rsh-args)))
+ (setq host (match-string 1 host)))
(setenv "TERM" tramp-terminal-type)
(let* ((default-directory (tramp-temporary-file-directory))
(coding-system-for-read (unless (and (not (featurep 'xemacs))
(> emacs-major-version 20))
tramp-dos-coding-system))
(p (if user
- (apply #'start-process
- (tramp-buffer-name multi-method method user host)
- (tramp-get-buffer multi-method method user host)
- (tramp-get-rsh-program multi-method method)
- host "-l" user
- (tramp-get-rsh-args multi-method method))
- (apply #'start-process
- (tramp-buffer-name multi-method method user host)
- (tramp-get-buffer multi-method method user host)
- (tramp-get-rsh-program multi-method method)
- host
- (tramp-get-rsh-args multi-method method))))
+ (apply #'start-process bufnam buf rsh-program
+ host "-l" user rsh-args)
+ (apply #'start-process bufnam buf rsh-program
+ host rsh-args)))
(found nil))
(process-kill-without-query p)
(tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
@c Version values, for easy modification
@c NOTE: The 'UPDATED' value is updated by the 'time-stamp' function.
@c If you change it by hand, the modifications will not stay.
-@set VERSION $Revision: 1.2 $
+@set VERSION $Revision: 1.3 $
@set UPDATED Monday, 17 June, 2002
@command{ssh1} and @command{ssh2} commands explicitly. If you don't know
what these are, you do not need these options.
+All the methods based on @command{ssh} have an additional kludgy
+feature: you can specify a host name which looks like @file{host#42}
+(the real host name, then a hash sign, then a port number). This
+means to connect to the given host but to also pass @code{-p 42} as
+arguments to the @command{ssh} command.
+
@item @option{tm} --- @command{telnet} with @command{mimencode}
@command{uuencode} and @command{uudecode} commands to transfer files
between the machines.
-As with the @command{ssh} and base64 option above, this provides the
-@option{su1} and @option{su2} methods to explicitly select an ssh
-version.
+As with the @command{ssh} and base64 option (@option{sm}) above, this
+provides the @option{su1} and @option{su2} methods to explicitly
+select an ssh version.
Note that this method does not invoke the @command{su} program, see
below for methods which use that.
+This supports the @command{-p} kludge.
+
@item @option{tu} --- @command{telnet} with @command{uuencode}
pseudo tty. When this happens, the login shell is wont to not print
any shell prompt, which confuses @tramp{} mightily.
+This supports the @command{-p} kludge.
+
@item @option{km} --- @command{krlogin} with @command{mimencode}
CCC: Do we have to connect to the remote host once from the command
line to accept the SSH key? Maybe this can be made automatic?
+CCC: Does @command{plink} support the @command{-p} option? Tramp
+will support that, anyway.
+
@item @option{plinkm} --- @command{plink} with @command{mimencode}
Like @option{plinku}, but uses base64 encoding instead of uu encoding.
session can begin to absorb the advantage that the lack of encoding and
decoding presents.
+All the @command{ssh} based methods support the kludgy @command{-p}
+feature where you can specify a port number to connect to in the host
+name. For example, the host name @file{host#42} tells Tramp to
+specify @command{-p 42} in the argument list for @command{ssh}.
+
@item @option{rsync} --- @command{ssh} and @command{rsync}
@command{rcp} based methods when writing to the remote system. Reading
files to the local machine is no faster than with a direct copy.
+This method supports the @command{-p} hack.
+
@item @option{scpx} --- @command{ssh} and @command{scp}
pseudo tty. When this happens, the login shell is wont to not print
any shell prompt, which confuses @tramp{} mightily.
+This method supports the @command{-p} hack.
+
@item @option{pscp} --- @command{plink} and @command{pscp}
@command{pscp} for transferring the files. These programs are part
of PuTTY, an SSH implementation for Windows.
+CCC: Does @command{plink} support the @command{-p} hack?
+
@item @option{fcp} --- @command{fsh} and @command{fcp}