You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, after connecting with connectbot and authenticating, connectbot - or more specifically the connection terminal - hangs. The command is never ran. I can see from the host logs the authentication succeeded.
Other clients can connect correctly to a host configured this way (to run the command).
If I remove restrict from authorized_keys, the command will run correctly. I've noticed the culprit is no_pty option of sshd. However, remowing no_pty is not optimal.
Steps to reproduce
Create an ssh key pair (or use an already existing one)
set up a host with an authorized_keys with a line similar to this: command="/my command",restrict ssh-ed25519 THEPUBKEY....ENDS MyName, with the public key from step one.
Connect to this host with ConnectBot
You may try to connect with other clients (they will succeed), or remove "restrict" from authorized_keys (no-port-forwarding, no-X11-forwarding, no-agent-forwarding seem to have no ill effects). All these will succeed (to demonstrate pinpoint the bug).
Expected behavior
Connectbot should connect correctly after authenticating.
Android device
Device: Fairphone 4
OS: Android 12, FP4.SP2K.B.089.20230807
ConnectBot Version: 1.9.9
Server information
OS: OpenWRT-22.03
SSH Software and Version: Dropbear v2022.82
Pubkeys used: ssh-ed25519
The text was updated successfully, but these errors were encountered:
WildPenquin
changed the title
Connectbot connection window hangs if the host has command="/some/command",restrict in authorized_keys
Connectbot connection window hangs if the host has command="/some/command",no_pty in authorized_keys
Oct 5, 2023
WildPenquin
changed the title
Connectbot connection window hangs if the host has command="/some/command",no_pty in authorized_keys
Connectbot terminal view hangs if the host has command="/some/command",no_pty in authorized_keys
Oct 5, 2023
Bug description
I'm trying to a host where I've limited the user to only run one allowed command. Hence, I have on the host $HOME/.ssh/authorized_keys:
However, after connecting with connectbot and authenticating, connectbot - or more specifically the connection terminal - hangs. The command is never ran. I can see from the host logs the authentication succeeded.
Other clients can connect correctly to a host configured this way (to run the command).
If I remove
restrict
from authorized_keys, the command will run correctly. I've noticed the culprit isno_pty
option of sshd. However, remowingno_pty
is not optimal.Steps to reproduce
command="/my command",restrict ssh-ed25519 THEPUBKEY....ENDS MyName
, with the public key from step one.You may try to connect with other clients (they will succeed), or remove "restrict" from authorized_keys (no-port-forwarding, no-X11-forwarding, no-agent-forwarding seem to have no ill effects). All these will succeed (to demonstrate pinpoint the bug).
Expected behavior
Connectbot should connect correctly after authenticating.
Android device
Server information
The text was updated successfully, but these errors were encountered: