[GH-ISSUE #54] Force interactive session on empty command #13

Closed
opened 2026-05-07 00:17:25 +02:00 by BreizhHardware · 10 comments

Originally created by @snk33 on GitHub (Nov 18, 2020).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/54

Hello,

I'm trying to use The Bastion through a iOS SSH client but I'm unable to make it work as the bastion needs some command on connection :

Bad or empty command

The app can send command on connect but I've tried many things without success :

-i
-- -i
ssh root@someserver
info
-i info

An option to allow to force session to be interactive if there's no command would be nice, even though I'm not sure it would work without option "-t" support on the given SSH client (doesn't work on my Terminal MacOS app).

The obvious goal is to have a better compatibility with any kind of SSH client app, not everyone uses Linux/MacOS/Unix terminal ;)

Originally created by @snk33 on GitHub (Nov 18, 2020). Original GitHub issue: https://github.com/ovh/the-bastion/issues/54 Hello, I'm trying to use The Bastion through a iOS SSH client but I'm unable to make it work as the bastion needs some command on connection : ``` Bad or empty command ``` The app can send command on connect but I've tried many things without success : ``` -i -- -i ssh root@someserver info -i info ``` An option to allow to force session to be interactive if there's no command would be nice, even though I'm not sure it would work without option "-t" support on the given SSH client (doesn't work on my Terminal MacOS app). The obvious goal is to have a better compatibility with any kind of SSH client app, not everyone uses Linux/MacOS/Unix terminal ;)
BreizhHardware 2026-05-07 00:17:25 +02:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@speed47 commented on GitHub (Nov 18, 2020):

Interesting use case, this could be a configurable option indeed! (and possibly enabled by default for new installs).

The "send command" should work however, hmm. Which app are you using? To check if I can reproduce.

<!-- gh-comment-id:729883339 --> @speed47 commented on GitHub (Nov 18, 2020): Interesting use case, this could be a configurable option indeed! (and possibly enabled by default for new installs). The "send command" should work however, hmm. Which app are you using? To check if I can reproduce.
Author
Owner

@snk33 commented on GitHub (Nov 18, 2020):

I'm using the excellent (and Made in France) WebSSH app. There's a command feature that allows to set a favorite command and send it on connection but it doesn't work :(

<!-- gh-comment-id:729884240 --> @snk33 commented on GitHub (Nov 18, 2020): I'm using the excellent (and Made in France) WebSSH app. There's a command feature that allows to set a favorite command and send it on connection but it doesn't work :(
Author
Owner

@speed47 commented on GitHub (Nov 18, 2020):

Ok, let me take a iThingy out of one of my drawers, charge it a bit, and test this app ;)

Edit: ok, the "launch command on connection" is actually waiting for a bash prompt to manually input the command you have configured (as if you typed it on your keyboard), this is different from specifying a command directly on the ssh command-line, that's why you can't make it work.

Maybe the WebSSH dev could add the feature ;)

In any case, I like your suggestion of going into interactive mode by default (as long as it's not disabled in the settings, of course). You can probably expect a version by tomorrow!

<!-- gh-comment-id:729895650 --> @speed47 commented on GitHub (Nov 18, 2020): Ok, let me take a iThingy out of one of my drawers, charge it a bit, and test this app ;) Edit: ok, the "launch command on connection" is actually waiting for a bash prompt to manually input the command you have configured (as if you typed it on your keyboard), this is different from specifying a command directly on the ssh command-line, that's why you can't make it work. Maybe the WebSSH dev could add the feature ;) In any case, I like your suggestion of going into interactive mode by default (as long as it's not disabled in the settings, of course). You can probably expect a version by tomorrow!
Author
Owner

@isontheline commented on GitHub (Nov 19, 2020):

Hello @snk33, Hello @speed47 👋

I'm the WebSSH developer 😊
Thank you @snk33 for issue https://github.com/isontheline/pro.webssh.net/issues/110

I will also check on my side if I can add support of "-t" switch inside WebSSH.

I think I will also use the-bastion in our office 👍

<!-- gh-comment-id:730621457 --> @isontheline commented on GitHub (Nov 19, 2020): Hello @snk33, Hello @speed47 👋 I'm the [WebSSH](https://apps.apple.com/fr/app/webssh/id497714887) developer 😊 Thank you @snk33 for issue https://github.com/isontheline/pro.webssh.net/issues/110 I will also check on my side if I can add support of "-t" switch inside WebSSH. I think I will also use [the-bastion](https://github.com/ovh/the-bastion) in our office 👍
Author
Owner

@snk33 commented on GitHub (Nov 19, 2020):

I’m glad to establish the link between 2 nice french projects :)

<!-- gh-comment-id:730628745 --> @snk33 commented on GitHub (Nov 19, 2020): I’m glad to establish the link between 2 nice french projects :)
Author
Owner

@speed47 commented on GitHub (Nov 20, 2020):

Hey @isontheline, nice to hear, thanks ;)
Don't hesitate if you have any questions!

<!-- gh-comment-id:730962601 --> @speed47 commented on GitHub (Nov 20, 2020): Hey @isontheline, nice to hear, thanks ;) Don't hesitate if you have any questions!
Author
Owner

@speed47 commented on GitHub (Nov 20, 2020):

@snk33 the v3.01.00 version has the option to drop the user into interactive mode if nothing is specified on the command-line.

As the implicit behavior of the openssh client is to imply -t when there is nothing specified on the command line (i.e. the user wants to have a remote shell and so they need a pseudotty), maybe that'll work out of the box with WebSSH. It depends whether the lib @isontheline uses also has this behavior or not ;)

<!-- gh-comment-id:731281286 --> @speed47 commented on GitHub (Nov 20, 2020): @snk33 the v3.01.00 version has the option to drop the user into interactive mode if nothing is specified on the command-line. As the implicit behavior of the `openssh` client is to imply `-t` when there is nothing specified on the command line (i.e. the user wants to have a remote shell and so they need a pseudotty), maybe that'll work out of the box with WebSSH. It depends whether the lib @isontheline uses also has this behavior or not ;)
Author
Owner

@snk33 commented on GitHub (Nov 20, 2020):

I've updated our Bastion and it works as expected.

Good news, I've also managed to connect through WebSSH, it prompts "osh" as expect so I can type any command like "ssh user@host" and bastion works well.

Thanks a lot for this quick implementation ! I'll make some more tests but I guess any further adjustments will mostly be on WebSSH side (like send command on connection so allow direct connection to a server through the bastion).

<!-- gh-comment-id:731291201 --> @snk33 commented on GitHub (Nov 20, 2020): I've updated our Bastion and it works as expected. Good news, I've also managed to connect through WebSSH, it prompts "osh" as expect so I can type any command like "ssh user@host" and bastion works well. Thanks a lot for this quick implementation ! I'll make some more tests but I guess any further adjustments will mostly be on WebSSH side (like send command on connection so allow direct connection to a server through the bastion).
Author
Owner

@isontheline commented on GitHub (Nov 20, 2020):

Whoo you're fast @speed47
Thank you.

Yes @snk33 I will try to work on https://github.com/isontheline/pro.webssh.net/issues/110 this night I hope 🤞

☀️ Have a nice day

<!-- gh-comment-id:731304728 --> @isontheline commented on GitHub (Nov 20, 2020): Whoo you're fast @speed47❗️ Thank you. Yes @snk33 I will try to work on https://github.com/isontheline/pro.webssh.net/issues/110 this night <ins>I hope</ins> 🤞 ☀️ Have a nice day
Author
Owner

@speed47 commented on GitHub (Nov 26, 2020):

Feature has been released in v3.01.00, closing. Thanks for the suggestion!

<!-- gh-comment-id:734177584 --> @speed47 commented on GitHub (Nov 26, 2020): Feature has been released in v3.01.00, closing. Thanks for the suggestion!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#13
No description provided.