Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple SSH Client port forwarding #108

Open
vheydari opened this issue Apr 3, 2022 · 4 comments
Open

Simple SSH Client port forwarding #108

vheydari opened this issue Apr 3, 2022 · 4 comments

Comments

@vheydari
Copy link

vheydari commented Apr 3, 2022

I am trying to figure out how to write a simple Swift code for running an ssh client port forwarding command. I am aware of [swift-nio-ssh] but am not sure how to use that in Xcode. Any suggestion?

@Lukasa
Copy link
Collaborator

Lukasa commented Apr 4, 2022

swift-nio-ssh can be used as a Swift Package in Xcode and imported as normal. Example code is present in the repository here, with this block (and its associated code) being an indication of how to drive port forwarding.

Note that swift-nio-ssh is very low level: it's not terribly easy to use and requires a lot of familiarity with both SSH and with NIO.

@vheydari
Copy link
Author

vheydari commented Apr 6, 2022

Thank you, @Lukasa.
Just for clarification, I am looking for an SSH Client code to do port forwarding on iOS. The SSH server is a Linux machine. Should I go with swift-nio-ssh or do you have another suggestion?

I really appreciate your help.

@Lukasa
Copy link
Collaborator

Lukasa commented Apr 6, 2022

swift-nio-ssh is certainly capable of doing the job, but I don't know if anyone in the Swift community has a higher-level wrapper you can use.

@Joannis
Copy link
Collaborator

Joannis commented Jun 28, 2022

@vheydari did you check out Citadel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants