On 7/23/2010 10:25 AM, Michael Albinus wrote:
"Jonathan Hill"<[email protected]>  writes:

Per your suggestion, I did the testing you suggested. The results are
interesting. If you send "plink rh1.orc.com -l root", it does NOT
register that a username was passed. However, if you send "plink -l
root rh1.orc.com", then it works as expected. I suspect that I still
need to change something about how tramp passes the command, but
perhaps (hopefully) the "trimming" is just a red herring in this case.
Thanks for analysis, I've committed the following patch:

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp.el.~2.805~       2010-07-23 
16:02:42.409923357 +0200
--- /home/albinus/src/tramp/lisp/tramp.el       2010-07-23 15:52:10.000000000 
+0200
***************
*** 599,606 ****
             (tramp-copy-keep-date       nil)
             (tramp-password-end-of-line nil))
       ("plink" (tramp-login-program        "plink")
!            (tramp-login-args           (("%h") ("-l" "%u") ("-P" "%p")
!                                         ("-ssh")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         nil)
             (tramp-copy-args            nil)
--- 599,606 ----
             (tramp-copy-keep-date       nil)
             (tramp-password-end-of-line nil))
       ("plink" (tramp-login-program        "plink")
!            (tramp-login-args           (("-l" "%u") ("-P" "%p")
!                                         ("-ssh") ("%h")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         nil)
             (tramp-copy-args            nil)
***************
*** 609,616 ****
             (tramp-default-port         22))
       ("plink1"
             (tramp-login-program        "plink")
!            (tramp-login-args           (("%h") ("-l" "%u") ("-P" "%p")
!                                         ("-1" "-ssh")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         nil)
             (tramp-copy-args            nil)
--- 609,616 ----
             (tramp-default-port         22))
       ("plink1"
             (tramp-login-program        "plink")
!            (tramp-login-args           (("-l" "%u") ("-P" "%p")
!                                         ("-1" "-ssh") ("%h")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         nil)
             (tramp-copy-args            nil)
***************
*** 633,640 ****
             (tramp-copy-keep-date       nil)
             (tramp-password-end-of-line nil))
       ("pscp"  (tramp-login-program        "plink")
!            (tramp-login-args           (("%h") ("-l" "%u") ("-P" "%p")
!                                         ("-ssh")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         "pscp")
             (tramp-copy-args            (("-P" "%p") ("-scp") ("-p" "%k")))
--- 633,640 ----
             (tramp-copy-keep-date       nil)
             (tramp-password-end-of-line nil))
       ("pscp"  (tramp-login-program        "plink")
!            (tramp-login-args           (("-l" "%u") ("-P" "%p")
!                                         ("-ssh") ("%h")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         "pscp")
             (tramp-copy-args            (("-P" "%p") ("-scp") ("-p" "%k")))
***************
*** 642,649 ****
             (tramp-password-end-of-line "xy") ;see docstring for "xy"
             (tramp-default-port         22))
       ("psftp" (tramp-login-program        "plink")
!            (tramp-login-args           (("%h") ("-l" "%u") ("-P" "%p")
!                                         ("-ssh")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         "pscp")
             (tramp-copy-args            (("-P" "%p") ("-sftp") ("-p" "%k")))
--- 642,649 ----
             (tramp-password-end-of-line "xy") ;see docstring for "xy"
             (tramp-default-port         22))
       ("psftp" (tramp-login-program        "plink")
!            (tramp-login-args           (("-l" "%u") ("-P" "%p")
!                                         ("-ssh") ("%h")))
             (tramp-remote-sh            "/bin/sh")
             (tramp-copy-program         "pscp")
             (tramp-copy-args            (("-P" "%p") ("-sftp") ("-p" "%k")))
--8<---------------cut here---------------end--------------->8---

Thanks,

--jonathan
Best regards, Michael.
Michael,

Thank you for your attention to this. As it turns out, the patch is not actually necessary. Your original suggestion to check my putty settings was absolutely correct. As it turns out, my Default Settings in putty for hostname were "rh1.orc.com." My guess is that putty somehow prefers the default setting and tramples (pun intended) whatever tramp is actually trying to send to plink.

Thanks again,

--jonathan

_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to