[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remote restricted bash does not allow hopping?
From: |
Michael Albinus |
Subject: |
Re: remote restricted bash does not allow hopping? |
Date: |
Thu, 05 Jul 2012 09:32:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Rodrigo Amestica <address@hidden> writes:
> Hi,
Hi Rodrigo,
> I'm trying to enable a one-hop login to a remote network to which I
> need to go first through a ssh login host, which provides only an rbash
> shell and there is no access to standard commands. As far as I can
> tell only 'ssh' command works in that server.
>
> 'exec' is indeed not available in my login server. Is this the
> problem? Is there a local tramp based work around?
Yes, that's the problem. Tramp does not support hops through restricted
shells. I will check, whether I could implement it, somehow.
As workaround, you might try the following patch:
--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/tramp/lisp/tramp-sh.el.~2.76~ 2012-07-05
09:27:50.917640064 +0200
--- /home/albinus/src/tramp/lisp/tramp-sh.el 2012-07-05 09:22:46.917467906
+0200
***************
*** 4419,4438 ****
?h l-host ?u l-user ?p l-port ?t tmpfile)
command
(concat
- ;; We do not want to see the trailing local
- ;; prompt in `start-file-process'.
- (unless (memq system-type '(windows-nt)) "exec ")
command " "
(mapconcat
(lambda (x)
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
(unless (member "" x) (mapconcat 'identity x " ")))
login-args " ")
! ;; Local shell could be a Windows COMSPEC. It
! ;; doesn't know the ";" syntax, but we must exit
! ;; always for `start-file-process'. "exec" does
! ;; not work either.
! (if (memq system-type '(windows-nt)) " && exit || exit")))
;; Send the command.
(tramp-message vec 3 "Sending command `%s'" command)
--- 4419,4431 ----
?h l-host ?u l-user ?p l-port ?t tmpfile)
command
(concat
command " "
(mapconcat
(lambda (x)
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
(unless (member "" x) (mapconcat 'identity x " ")))
login-args " ")
! " && exit || exit"))
;; Send the command.
(tramp-message vec 3 "Sending command `%s'" command)
--8<---------------cut here---------------end--------------->8---
> thanks,
> Rodrigo
Best regards, Michael.