Correcting a typo :
Stéphane Senesi wrote, On 26/04/2012 14:57:
Dear all,
Sorry if my question is a dumb one, but I already spent some time
struggling with my issue :
My gentle network administrator provided me with bastion that can work
in two ways :
1- either by typing "ssh -l my_account bastion", in which case I
am provided with a menu for choosing among a limited list of hosts.
After the choice, I am directly prompted with the password on the
chosen remote host
2- or by typing "ssh -l my_account bastion remote_host", in which
case I am directly prompted with the password on that host
So, I tried to match that with what I learned from "info tramp":
- beginning with case2 : I wrote a method called "wab", which I
added to tramp-methods. This method is a copy of method ssh , except
for the addition of the string representing the remote host, in the
tramp-login-arguments after %h (see code below); and I tried to used
this method to login to the bastion. The answer by tramp is ' Host
`uwab' looks like a remote host, `wab' can only use the local host'
- then trying case 1, I tried to customize the
'tramp-actions-before-shell to process the sequence where I am
prompted with a menu, but quickly realized that
tramp-actions-before-shell do address the prompting which occur after
password prompting.
- again with case 1,
should read "again with case 2"
I also tried to configure my ~/.ssh/config file to provide for the
bastion a "User:" field which is a combined string including both
"my_account bastion" and "remote_host" (because this is what works on
the interactive ssh ), but ssh client then either considers that my
config file is garbled (if I put double quotes around both strings) or
take the whole string as the user name on the bastion (which of course
won't work)
Thanks for any help
Here follows my code for method "wab"
Best regards
S
(setq wab
'("wab"
(tramp-login-program "ssh")
(tramp-login-args
(("-l" "%u")
("-p" "%p")
("-e" "none")
("%h [email protected]")
))
(tramp-async-args
(("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args
("-c"))
(tramp-gw-args
(("-o" "GlobalKnownHostsFile=/dev/null")
("-o" "UserKnownHostsFile=/dev/null")
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22)))
(setq tramp-methods (cons wab tramp-methods))
--
Stéphane Sénési
Ingénieur - équipe Assemblage du Système Terre
Centre National de Recherches Météorologiques
Groupe de Météorologie à Grande Echelle et Climat
CNRM/GMGEC/ASTER
42 Av Coriolis
F-31057 Toulouse Cedex 1
+33.5.61.07.99.31 (Fax :....9610)
--
Stéphane Sénési
Ingénieur - équipe Assemblage du Système Terre
Centre National de Recherches Météorologiques
Groupe de Météorologie à Grande Echelle et Climat
CNRM/GMGEC/ASTER
42 Av Coriolis
F-31057 Toulouse Cedex 1
+33.5.61.07.99.31 (Fax :....9610)
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel