Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6106083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:02:30+00:00 2026-05-23T14:02:30+00:00

Im fairly new to unix/linux and have a question while trying to ssh tunnel

  • 0

Im fairly new to unix/linux and have a question while trying to ssh tunnel to a computer at my college.

Im trying to access computer A which is on my school network. But it cannot be accessed unless i am already insice the school network. I can ssh into computer B and then ssh into computer A. Lets say computer C is only accessible via computer B, how would i make a shell script that would do this for me?

So far i tunneled to computer A via B but cannot get to C.
I tried this

    ssh -t user@computerB 'ssh user@computerA' 'ssh user@computerC'
    sh -t user@computerB "ssh user@computerA 'ssh user@computerC'"

What am i doing wrong

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:02:31+00:00Added an answer on May 23, 2026 at 2:02 pm

    Seems to be working for me. Apparently you have to use -t to force ptty allocation for each jump:

    jcomeau@intrepid:~/rentacoder/peppe/dentalcam$ ssh -t www "ssh -t tek 'ssh -t www'"
    Linux unixshell.jcomeau.com 2.6.18.8 #1 SMP Mon Nov 22 15:26:09 EST 2010 i686 GNU/Linux
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    No mail.
    Last login: Thu Jul  7 02:03:30 2011 from c-76-103-110-80.hsd1.ca.comcast.net
    jcomeau@unixshell:~$ logout
    Connection to www closed.
    Connection to tek closed.
    Connection to www closed.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi everyone I am fairly new to Unix so forgive me! I have the
Being fairly new to C++ I have a question bascially concerning the g++ compiler
Im fairly new to c sorry if this is a stupid question! i have
I am fairly new to Emacs and I have been trying to figure out
I fairly new to programming for the Android platform and have some question about
I'm still fairly new to Java and have a question in regards to JTable
Fairly new to Objective C and trying to work within Storyboards given it's the
I fairly new to JQuery and perhaps trying to achieve something that might be
I am new to fairly new to AS3 and I have found myself needing
I am fairly new to c# and am trying to write a n-tiered web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.