Giter VIP home page Giter VIP logo

Comments (9)

kdrag0n avatar kdrag0n commented on May 29, 2024 1

Added for the next version as a CLI-only setting: ssh.expose_port

from orbstack.

kdrag0n avatar kdrag0n commented on May 29, 2024 1

Released in v1.3.0.

from orbstack.

kdrag0n avatar kdrag0n commented on May 29, 2024

On second thought, I think this is kind of redundant. Users will likely already have macOS' SSH server enabled, and in that case you can just run the orb command once you've logged in to Mac.

from orbstack.

tiann avatar tiann commented on May 29, 2024

This is very useful when remotely using vscode on one macOS to operate Linux in the orbstack of another macOS

from orbstack.

tiann avatar tiann commented on May 29, 2024

My remote development scenario is as follows: I use a Mac A to SSH into Mac B remotely, and Mac B runs a Linux virtual machine using OrbStack.

When using VSCode Remote, it supports a jump server, so I have added the following configuration to ~/.ssh/config on Mac A:

Host macmini
    HostName <mac B's IP>
    User admin

Host orbmini
    HostName 127.0.0.1
    User admin
    Port 32222
    IdentityFile ~/.ssh/id_macmini
    ProxyCommand ssh -W %h:%p macmini

This allows me to directly select orbmini in VSCode Remote's SSH and log in remotely.

When using JetBrains IDEA, since it does not support jump server login, I have to use SSH port forwarding. I run the following command on Mac A:

ssh -L 0.0.0.0:22222:localhost:32222 -N admin@<mac B's IP>

Then I use IDEA to connect to the SSH on port 22222 at 127.0.0.1; additionally, if I need to map the ADB port of a local Android device to the OrbStack on Mac B, I need to configure an extra port forwarding command.

Although it does indeed work, it's quite inconvenient, and I'm very hopeful that this feature can be added. Thank you! @kdrag0n

from orbstack.

kdrag0n avatar kdrag0n commented on May 29, 2024

Released in v1.3.0 Canary 1.

from orbstack.

tiann avatar tiann commented on May 29, 2024

I can connect to OrbStack in mac B directly now, it works well!

But i can only forward 5037 port in mac A to mac B, forward it to OrbStack in mac B has failed, my command is:

ssh -R 5037:0.0.0.0:5037 -Nf orb@macB -p 32222 -vvv

And the log shows:

debug1: Remote connections from LOCALHOST:5037 forwarded to local address 0.0.0.0:5037
debug3: send packet: type 80
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: forking to background
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: client_repledge: enter
debug3: receive packet: type 82
debug1: remote forward failure for: listen 5037, connect 0.0.0.0:5037
Warning: remote port forwarding failed for listen port 5037
debug2: forwarding_success: -1 expected forwarding replies remaining

If i forward it directly to mac B, it would success.

from orbstack.

kdrag0n avatar kdrag0n commented on May 29, 2024

OrbStack's SSH server doesn't currently support reverse port forwarding.

from orbstack.

tiann avatar tiann commented on May 29, 2024

OrbStack's SSH server doesn't currently support reverse port forwarding.

Ok, is there any plan for that? Currently i forward the port to mac, and use mac link adb in OrbStack.

from orbstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.