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

  • Home
  • SEARCH
  • 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 8977455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:22:33+00:00 2026-06-15T19:22:33+00:00

I have two machines say A and B on B I have a virtual

  • 0

I have two machines say A and B

on B I have a virtual machine running ( lets say its VB ) .
Unfortunately , the VB has a static local IP address ( 192.168.79.1 ) which can’t be changed .

I am successfully able to ssh in the following way

A -> B
B -> VB

I tried to setup ssh port forwarding on B ( port 7777) to forward to VB (port 22) .But somehow its not happening .

Should I be using -L or -R ?

I tried many ways..

ssh -R 7777:192.168.79.1:22 root@192.168.79.1

ssh -L 7777:192.168.79.1:22 root@192.168.79.1

ssh -L 7777:192.168.79.1:22 -l root localhost

May be I did not understand the syntax properly or am I missing something silly ?

I want to connect to A->VB ( via some xyz port on B ) . Please guide me how to set this up .

BTW , all the machines need a username and password..I did not yet add the keys (so please consider this also).

Thanks!!

  • 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-06-15T19:22:34+00:00Added an answer on June 15, 2026 at 7:22 pm

    You address the wrong host to setup your tunnel. What you are trying to do is actually not port forwarding, that is usually done on a firewall level. Instead you try to setup a tunnel to expose your ssh server on VB under some port xyz on system B. For this you have to ssh into that system B, not into VB. So something like this:

    ssh -L7777:192.168.79.1:22 some_user@<B>
    

    So user ‘some_user’ sshs into host B and does nothing else there (<B> has to be replaced with Bs ip address or name), except he additionally creates a ‘ssh tunnel’ you can now use to connect through:

    ssh root@<B>:7777
    

    Have a try, you well see that you are actually login in into VB because your request is tunneled through to port 22 on host VB in a transparent manner. So B acts as a tunnel relay.

    But this is a little annoying for everyday usage. Think of finding a solution on firewall level using iptables instead. That saves you from having to create the ssh tunnel before using it. Alternatively there are also utilities like plasmoids and the like to setup an ssh tunnel in a more convenient way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have two SQL Server databases running on separate machines, call them
I have two databases on one machine that also has two different sites running
I have two instances of VS2010 running on same machine.One VS instance has a
I have two machines, say in the company domain CorpotateDomain . First machine: first.CorpotateDomain.com
Lets say I have two .dlls, Dll1 and Dll2. DLL1 uses or makes calls
My question is, if machine A have two IP address X,Y. Can it open
I have two databases on a local machine, connected to localhost . They both
let's say i have an algorithm A run on two machines X and Y.
I'm trying to connect two machines, say machine A and B. I'm trying to
I have two machines, Say Machine1 and Machine2. I have mapped one shared folder

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.