Solved

ssh twice on one command line?

Posted on 2006-11-09
4
778 Views
Last Modified: 2013-12-16
I would like to ssh to our firewall server and then from there ssh to another server all from within the same command line.  Is this possible?

I am using ssh keys, so no passwords are needed if I go first to the firewall and then from the firewall to the other system.

ssh bryan@firewall "ssh bryan@anothersystem"

I've already tried, and it says this:

Pseudo-terminal will not be allocated because stdin is not a terminal.
Killed by signal 2.

I have to press [ctrl]-c to cancel the operation because it doesn't work.
0
Comment
Question by:bryanlloydharris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 450 total points
ID: 17912373
ssh bryan@firewall "ssh -t bryan@anothersystem"
0
 
LVL 14

Assisted Solution

by:ygoutham
ygoutham earned 50 total points
ID: 17912533
hi,

the machine is not hanging.  what you have is only the prompt which has nothing before to prompt you.   the basic shell is missing. if you type a command you would see the output of the command.

try a ls or a pwd to see the results yourself when you are presented with a empty line.  you can always do a CTRL-D to exit gracefully than killing with signal 2.

goutham
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 17914877
Thanks!
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 17914887
Just in case someone else comes across this question, I used ssh -t host "ssh -t host2" to get it to work.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Samba Question 11 137
The better OS Architecture 13 108
sed command 3 26
how to write and save a unix script 12 35
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question