SSH does not work due to an Error: No PTY channel to show an interactive prompt on
WG in docker: ghcr.io/warp-tech/warpgate:0.13.3
13:15:22 INFO SSH: Password auth as <admin for ****.****.***> session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 client_ip=::ffff:18.192.93.200
13:15:22 INFO SSH: Authenticated username=admin credentials=password session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 client_ip=::ffff:18.192.93.200
13:15:22 INFO SSH: Opening session channel channel=a0b04f80-8daf-4697-93ab-bd7af5c3f5d8 session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 session_username=admin client_ip=::ffff:18.192.93.200
13:15:23 INFO SSH: Connecting address=192.168.24.120:22 username="root" session=16231c1b-e34c-4802-8fac-8210ce3b6ca8
13:15:23 WARN Host key is unknown session=16231c1b-e34c-4802-8fac-8210ce3b6ca8
13:15:23 WARN SSH:SSH: Target host key is not trusted, but there is no active PTY channel to show the trust prompt on. session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 session_username=admin client_ip=::ffff:18.192.93.200 session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 session_username=admin client_ip=::ffff:18.192.93.200
13:15:23 WARN SSH:SSH: Connect to this target with an interactive session once to accept the host key. session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 session_username=admin client_ip=::ffff:18.192.93.200 session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 session_username=admin client_ip=::ffff:18.192.93.200
13:15:23 ERROR SSH: Client event handler error: No PTY channel to show an interactive prompt on session=16231c1b-e34c-4802-8fac-8210ce3b6ca8 session_username=admin client_ip=::ffff:18.192.93.200
13:15:23 INFO SSH: Abort requested session=16231c1b-e34c-4802-8fac-8210ce3b6ca8
13:15:23 INFO SSH: Client session closed session=16231c1b-e34c-4802-8fac-8210ce3b6ca8
13:15:23 INFO SSH: Closed connection session=16231c1b-e34c-4802-8fac-8210ce3b6ca8
13:15:23 ERROR Server event handler error: mpsc error
13:15:23 ERROR Server event handler error: mpsc error
13:15:23 INFO Closed session
13:15:23 ERROR Session failed error=channel disconnected
When you connect to a target for the first time, do so from a normal interactive terminal. Warpgate will ask you to verify the target's host key and it needs an interactive terminal to show that prompt
Hi @Eugeny, I use Iterm2 and it works fine on another setup on previous versions (also in the docker). I guess the issue related to something else, but I cant catch it.
Are you forwarding your SSH agent per chance? I have a suspicion this might cause it.
Connecting to a host for the first time, while also forwarding the agent seems to cause this.
@samtoxie
Hi @samtoxie I on fresh setup (macOs Sequoia 15.6) I tested latest version in the docker, and the issue still present. Forwarding agent is not used in this case.
The last lines from log from the client
Authenticated to warpgate.xxx.xxx.xx ([XX.XX.XXX.XX]:10102) using "publickey".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: Requesting authentication agent forwarding.
debug1: Sending environment.
debug1: channel 0: setting env LC_CTYPE = "UTF-8"
debug1: channel 0: free: client-session, nchannels 1
Connection to warpgate.xxx.xxx.xx closed.
Transferred: sent 3124, received 2396 bytes, in 0.2 seconds
Bytes per second: sent 16623.5, received 12749.6
debug1: Exit status -1
The last lines from log from the warpgate container
09:57:44 INFO SSH: Public key auth as <admin for xxx.xxx.xx> with key AAAAC3NzaC1lZDI1NTE5AAAAIOYBHqmtuLBm2OcQeUKGYIlPFP1tBge3lhWuXvuEp8im session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 client_ip=XX.XX.XX.XX
09:57:44 INFO SSH: Authenticated username=admin credentials=public key session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 client_ip=XX.XX.XX.XX
09:57:44 INFO SSH: Authenticated username=admin credentials=public key session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 client_ip=XX.XX.XX.XX
09:57:44 INFO SSH: Opening session channel channel=e63568ef-9e4c-4931-ac1e-c8bc59ebc494 session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 session_username=admin client_ip=XX.XX.XX.XX
09:57:44 INFO SSH: Connecting address=XX.XX.XX.XX:10322 username="root" session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5
09:57:44 WARN Host key is unknown session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5
09:57:44 WARN SSH:SSH: Target host key is not trusted, but there is no active PTY channel to show the trust prompt on. session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 session_username=admin client_ip=XX.XX.XX.XX session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 session_username=admin client_ip=XX.XX.XX.XX
09:57:44 WARN SSH:SSH: Connect to this target with an interactive session once to accept the host key. session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 session_username=admin client_ip=XX.XX.XX.XX session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 session_username=admin client_ip=XX.XX.XX.XX
09:57:44 INFO SSH: Abort requested session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5
09:57:44 ERROR SSH: Client event handler error: No PTY channel to show an interactive prompt on session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5 session_username=admin client_ip=XX.XX.XX.XX
09:57:44 INFO SSH: Client session closed session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5
09:57:44 INFO SSH: Closed connection session=c497b5ce-08cd-45bc-b2c0-c5a57e94a7f5
09:57:44 ERROR Server event handler error: mpsc error
09:57:44 ERROR Server event handler error: Session end
09:57:44 INFO Closed session
09:57:44 ERROR Session failed error=channel disconnected
Ok I found the issue, agent was not used but the option in the config exists.
This cause an issue
ssh -o 'ForwardAgent yes' 'admin:[email protected]' -p 10102
This works (the host key confirmation appears as expected)
ssh -o 'ForwardAgent no' 'admin:[email protected]' -p 10102