ssh interactive session, through intermediate hosts ... problems ...

Adam Vande More amvandemore at
Sat Dec 4 02:16:55 UTC 2010

On Fri, Dec 3, 2010 at 6:43 PM, Josh Suid <joshsuid at> wrote:

> # ssh user at host ssh user at host2
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> Permission denied (publickey,keyboard-interactive).
> Is there a way to build this tunnel with a single command ? (an ssh
> command,
> run over an ssh command, run over an ssh command)
> Finally, is there a way to scp a file over intermediate hosts ?  That is to
> say, I want to scp the file:  user at host:/some/file to myself, but I want
> the ssh session to go through hosts X and Y first ... there must be a way
> to do this where you pipe the output of scp over ssh to ... head
> spinning...

Generally speaking, you'll do something like this:
then you can do fancier stuff to speed up working like passwordless login's,
terminal multiplexer's like tmux etc.

You may also wish to consider setting up a VPN.

Adam Vande More

More information about the freebsd-questions mailing list