Implement the ProxyCommand parameter to specify a command to use to connect to a server. This is useful (almost a requirement) in conjunction with Agent Forwarding and an ssh-agent #81.
First mentioned on #139
I seriously need this, Every server I need to access in behind a bastion servers. I know its hard to prioritize functions but I am willing to bounty this. Seriously, Im in for $200, ($300 if it works with a standard ssh config file, dont wanna have to define the proxy rules over and over again). I'm serious! What can I do to get this is accelerated and into a patch ASAP?
Bump!!!!!
I have this working but it needs ssh agent forwarding to be really useful. For mosh that would require us to catch up with the latest version. @RevREB do you have the keys on the other server?
I can confirm I have now ProxyCommand up and running, working on the Agent and the rest of the client. Fingers crossed to have this before holidays!
need this feature badly.
@carloscabanero sorry for the delay in responding, and I look forward to playing with the work you've done (when might the changes be included in the iOS store version), but to answer your question... No, there would not be private keys on the "bastion" host.
Looking forward to this.
This comes next ;)
Really looking forward to this, Is there any update about this and âagent forwardingâ?
I do believe you will be the first ios product on the market to support ProxyCommand. That should motivate you. I would state that in your app store description "above the fold"!
Really looking forward to this!!
On Tue, Apr 17, 2018 at 4:45 PM -0400, "Bruno Bronosky" notifications@github.com wrote:
I do believe you will be the first ios product on the market to support ProxyCommand. That should motivate you. I would state that in your app store description "above the fold"!
â
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
I'll be looking forward to this. As for being the first, the dead iSSH (https://web.archive.org/web/20120415035140/http://www.zinger-soft.com:80/iSSH_features.html) had a feature where you could forward ports via ssh, which would then be available to other apps on your iOS device.
This was extremely useful, i.e. mapping a port to an internal web server, then using safari to browse it via ssh.
@carloscabanero is there any movement on this? Itâs the only thing stopping me from doing my whole job from an iPad.
@RevREB we are working on libssh, so we are close to ProxyCommand and port forwarding.
https://cdn.discordapp.com/attachments/441940293240225793/463731449615613953/IMG_0511.TRIM.MOV
I saw that video. Canât canât wait enough to see this and proxycommand. Such an excellent ssh app
Here is a demo of ProxyCommand
Perfect! Looking forward to trying it out. An aside: recently i learned about
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist yes
The bastion host requires me to use MFA (duo) to login. Before i added this to the config, i had to enter my DUO prompt on my phone with every ssh access. Now wiht this in my config, as long as the first SSH session is open, i dont get MFA prompts anymore.
So nice.
Would blink support this for this version or in future?
Oh, interesting. For next release we will try to add support for iOS 12 sms codes suggestions feature.
Sent with GitHawk
But, yes. With new ssh command architecture it is not very hard to implement.
Sent with GitHawk
awesome! I might even upgrade to a 12"! For the record, my ssh/config is
Host hala
User sguha
HostName hala1.x.y.z
ProxyCommand ssh ssh.A.B -W %h:%p
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist yes
When i execute ssh hala, i get the following mfa prompt. When i enter '1', the DUO app on my IOS phone pops up asking me to accept. Once accepted, the ssh login completes and i'm in.
(for the record, the above image will expire in 14 days).
Currently this works with blink very nicely, Control* options allow me to do this just once (as long the first connection is kept open).
Cheers and thanks for all the hard work.
How can I configure .ssh/config on blink app?
I really want to use ProxyCommand function!
Hi @MasahiroMorita,
ProxyCommand is only available in TestFlight beta versions. No config support yet. Only with ssh -o "proxycommand=..."
I would love the extra mile to ProxyJump, that would help working with bastions and such.
Any ETA for when this (most wanted I must say ;-) ) feature will land in the App Store version of the app ?
Hi @aphecetche,
My ETA is next week :)
But it would be great if you can help us test beta version on Test Flight. I can send you invite on your GitHub email if you don't mind.
@yury sure I can try to test it, please send the invite.
@aphecetche sent you invite.
Thanks. How should I give my feedback ? Here on github ?
Here or at discord
May i also get an invite? I would like to try with my setup.
Hi @saptarshiguha, just sent invite to you.
I did install the test flight and i'm writing this (having uninstalled previous versions)
ssh -o "proxycommand=ssh -q bastion.Foo.net nc %h %p 2>/dev/null" hala
I also tried
ssh -o "proxycommand='ssh -q bastion.Foo.net nc %h %p 2>/dev/null'" hala
but in both cases i got
usage : ssh [....]
Note, I also tried ProxyCommand too
Yep, 2>/dev/null broke params.
ssh -o "proxycommand=..." ...
Thanks. I tried
ssh -o "proxycommand=ssh -q bastion.Foo.net nc %h %p " hala
which prints (yes/no): and control is returned to the blink prompt. Usually the equivalent
ssh -o ProxyCommand='ssh -q bastion.Foo.net nc %h %p' hala
sends me DUO prompt on my phone which i need to accept.
Please try
ssh -o "proxycommand=ssh -q -W %h:%p bastion.Foo.net" hala
same result
Can you make screenshots? from blink and other terminal?
It should be something like on this screenshot?

Yes,
From my laptop here is the screenshot (note the -W %h:%p syntax does not work).

(i've blanked out hostnames)
When i press enter, i get the following prompt on my phone

I accept and you see i'm logged in.
On the iPad (not yet ios12, the version prior), you can see the following image (and no prompt on my phone)

hala is in Hosts and corresponds to the same host as above. Moreover even if i enter some incorrect hostname(at the end, the bastion is still correct), i get the same response.
hope this helps.
Thank you @saptarshiguha,
will try to fix that tomorrow... Will post any updates on that.
Hi,
Iâm a bit at lost. My first test is pretty simple :
Host linode-ui
User laurent
Hostname 178.Xxx.yyy.zzz
But I canât connect using a simple âssh linode-uiâ
I assume this is because I misunderstood something obvious ;-)
A) is the .ssh/config supposed to be read ?
B) if it is, where do the keys are supposed to come from ? (From config or from the .ssh directory)
Hi,
.ssh/config is not supported yet. You need to run config command and add host and keys there.
Ok, so Iâve misunderstood how far the functionality Iâd need is already available.
I mean, if I need to get host+keys in config (as now) + type by hand the -o « proxycommand= .... » then thatâs not quite what I had in mind ;-)
Guess Iâll have to wait a bit more then...
I updated via testflight and eager to try it out again. How do i go about editing .ssh/config on the ipad?
We currently do not fully support .ssh/config. You should use âconfigâ command.
config -> hosts ->
Unfortunately, the same ending. Note, i'm using
ssh -q bastion.shared.xyz nc %h %p 2>/dev/null
as the ProxyCmd. The suggested example
ssh bastion.sharedxyz -W %h:%p
does not work (even when i ssh from my desktop, for some reason our bastion doesn't work with this form).
mouchak:~ sguha$ ssh hala -S none
channel 0: open failed: administratively prohibited: open failed
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host
On the server end, we have PermitTunnel=no set. Hope this provides some insight.
Hi @saptarshiguha,
Yes, if your sshd don't allow port forwarding, then you should use nc.
In ProxyCmd you should write ssh -q bastion.shared.xyz nc %h %p. (without 2>/dev/null)
But before you go to your host ssh to your bastion directly.
It will prompt you for host keys acceptance. You should accept it.
Then try connect to host with proxy command.
Thanks much.
ssh bastion
Connected to x.y.z.x
but returned to blink prompt (i..e not in remote terminal). If i ssh into bastion from my desktop I get
(along with a DUO prompt)
Autopushing login request to phone...
Success. Logging you in...
Similarly if i ssh into hala, i just get returned to blink prompt.
Yes, it should return to blink.
But now try to connect to your host with ProxyCmd thought bastion.
that too returns to blink. I'm also free to chat on Discord. I can join there if thats better
Host field "bastion" and HostName "bastion.foo.boo.net". SSH into this host once.then
Host field called "bastion". For the host which requires a bastion e.g. "hala" in the above discussion , i have the following for the ProxyCommand settingssh -o "RemoteCommand=nc %h %p 2>/dev/null" -q bastion
previously i was using the bastion's HostName field.
This works for me with DUO MultiFactor Auth too.
Thanks so much!!
Most helpful comment
This comes next ;)