Remote rejected opening a shell channel error not connected

when I connect to a jumpserver, I get this error: [SSH] Remote rejected opening a shell channel: Error: Unable to request a pseudo-terminal

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


Closed

459217974 opened this issue

Jan 15, 2020

· 32 comments

Comments

@459217974

when I connect to a jumpserver, I get this error:
[SSH] Remote rejected opening a shell channel: Error: Unable to request a pseudo-terminal

@Eugeny

Should be fixed in the just-released alpha 99

@459217974

emmm…. I’m using alpha 99 but get this error

@Eugeny

Is it a «normal» Linux/UNIX machine or a network device? Can you connect to it using OpenSSH without the -T (don’t allocate PTY) flag?

@459217974

It’s not a «normal» Linux/UNIX machine, It’s a jumpserver and it using the paramiko(python package) to simulate a terminal.
when I using -T flag, I can not connect to the server. logs:

ssh someone@jumpserver.address.com -p 2222 -T -v                                                                                                                      someone@localhost
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/someone/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to jumpserver.address.com [10.18.0.94] port 2222.
debug1: Connection established.
debug1: identity file /Users/someone/.ssh/id_rsa type 0
debug1: identity file /Users/someone/.ssh/id_rsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_dsa type -1
debug1: identity file /Users/someone/.ssh/id_dsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ed25519 type -1
debug1: identity file /Users/someone/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/someone/.ssh/id_xmss type -1
debug1: identity file /Users/someone/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version paramiko_2.4.1
debug1: no match: paramiko_2.4.1
debug1: Authenticating to jumpserver.address.com:2222 as 'someone'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:2Z1ekqP2dKrrLQbQwTyox5xMk80fqPgu6J6WRFiWTeg
debug1: Host '[jumpserver.address.com]:2222' is known and matches the RSA host key.
debug1: Found key in /Users/someone/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: Will attempt key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Will attempt key: /Users/someone/.ssh/id_dsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ecdsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ed25519 
debug1: Will attempt key: /Users/someone/.ssh/id_xmss 
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Server accepts key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Authentication succeeded (publickey).
Authenticated to jumpserver.address.com ([10.18.0.94]:2222).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LC_MESSAGES = en_US.UTF-8
debug1: Sending env LC_NUMERIC = en_US.UTF-8
debug1: Sending env LC_COLLATE = en_US.UTF-8
debug1: Sending env LC_MONETARY = en_US.UTF-8
debug1: channel 0: free: client-session, nchannels 1
Connection to jumpserver.address.com closed by remote host.
Transferred: sent 3024, received 1696 bytes, in 5.0 seconds
Bytes per second: sent 604.2, received 338.9
debug1: Exit status -1

and without -T flag:

ssh someone@jumpserver.address.com -p 2222 -v                                                                                                                         someone@localhost
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/someone/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to jumpserver.address.com [10.18.0.94] port 2222.
debug1: Connection established.
debug1: identity file /Users/someone/.ssh/id_rsa type 0
debug1: identity file /Users/someone/.ssh/id_rsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_dsa type -1
debug1: identity file /Users/someone/.ssh/id_dsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ed25519 type -1
debug1: identity file /Users/someone/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/someone/.ssh/id_xmss type -1
debug1: identity file /Users/someone/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version paramiko_2.4.1
debug1: no match: paramiko_2.4.1
debug1: Authenticating to jumpserver.address.com:2222 as 'someone'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:2Z1ekqP2dKrrLQbQwTyox5xMk80fqPgu6J6WRFiWTeg
debug1: Host '[jumpserver.address.com]:2222' is known and matches the RSA host key.
debug1: Found key in /Users/someone/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: Will attempt key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Will attempt key: /Users/someone/.ssh/id_dsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ecdsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ed25519 
debug1: Will attempt key: /Users/someone/.ssh/id_xmss 
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Server accepts key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Authentication succeeded (publickey).
Authenticated to jumpserver.address.com ([10.18.0.94]:2222).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LC_MESSAGES = en_US.UTF-8
debug1: Sending env LC_NUMERIC = en_US.UTF-8
debug1: Sending env LC_COLLATE = en_US.UTF-8
debug1: Sending env LC_MONETARY = en_US.UTF-8

and then connect succeed.

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks unless you comment.
Thank you for your contributions.

@stale
stale
bot

added
the

S: Stale

This issue had no activity for two months

label

Jul 15, 2020

@BenitzCoding

I’m having that issue. ;-;

@Issues-translate-bot

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.


I’m having that issue. ;-;

@antvig

Hi ! Also having the issue when trying to connect to a standard linux remote machine.

in bash ssh root@000.000.000.00 works fine but with a SSH connexion, I have the error :

 SSH  Loading private key: file://C:Usersant.sshid_rsa
 X  All configured authentication methods failed
 SSH   X  Remote rejected opening a shell channel: Error: Not connected

@boxker

I’m having that issue. ;-;

@b10c77

Having the issue as well, can this be when using an external private key file?

EDIT: it’s probably because I’m using the file in PEM format

@anzepintar

I am having this issue too. It gives me this error in tabby, but works fine in putty.

@luddystefenson

I’m having this issue as well. MobaXTerm connects fine with the same IP, Private key, port, and everything. Doesn’t work in Tabby.

SSH X Remote rejected opening a shell channel: Error: Not connected

@anzepintar

I managed to get it working for me by generating my key in ed255519 ssh-keygen -t ed25519 -C "your@email.address" and generating it with password.

@Gypsying

I’m having this issue as well….
Any methods to solve this issue?

@459217974

@Eugeny Can you reopen this issue? It seems that many people still encounter this issue. Opening this issue can get more attention. Maybe this problem can be fixed.

@stale
stale
bot

removed
the

S: Stale

This issue had no activity for two months

label

Jul 6, 2022

@accountnujen

точно такая же ошибка на ubuntu 22. Termius запускается без ошибки.

I managed to get it working for me by generating my key in ed255519 ssh-keygen -t ed25519 -C "your@email.address" and generating it with password.

I tried to do that, but it didn’t work.

@accountnujen

я проверил. Дело в версии ОС. Если на сервер поставить Ubuntu 22, то будет ошибка, а на версии Ubuntu 20 такой ошибки нет. Возможно, это проблема в каком-то сертификате, который истёк.

@Issues-translate-bot

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.


I checked. It’s the OS version. If you put Ubuntu 22 on the server, then there will be an error, but there is no such error on the Ubuntu 20 version. Perhaps this is a problem in some certificate that has expired.

@anzepintar

‎I‎ проверил. Дело в версии ОС. Если на сервер поставить Ubuntu 22, то будет ошибка, а на версии Ubuntu 20 такой ошибки нет. Возможно, это проблема в каком-то сертификате, который истёк.

It works fine for me on Ubuntu 22.04

@Issues-translate-bot

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.


‎I‎ checked. It’s the OS version. If you put Ubuntu 22 on the server, then there will be an error, but there is no such error on the Ubuntu 20 version. Perhaps this is a problem in some certificate that has expired.

It works fine for me on Ubuntu 22.04

@smutao

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.

I checked. It’s the OS version. If you put Ubuntu 22 on the server, then there will be an error, but there is no such error on the Ubuntu 20 version. Perhaps this is a problem in some certificate that has expired.

having the same issue here with ubuntu 22.04 on server

@cayenne17

I have the same problem on a ubuntu 22.04 server
I added the line in the file /etc/ssh/sshd_config on the server:
PubkeyAcceptedAlgorithms +ssh-rsa
I restarted the sshd service and now it works

@cayenne17

I have the same problem on a ubuntu 22.04 server I added the line in the file /etc/ssh/sshd_config on the server: PubkeyAcceptedAlgorithms +ssh-rsa I restarted the sshd service and now it works

On the server, I just tried to put back the config file /etc/ssh/sshd_config as it was.
On the tabby client, I then checked only rsa-sha2-256 and rsa-sha2-512 in host key :

image

On tabby, I always get the error message:
image

On the server, in the file /var/log/auth.log, I have the message:
image

userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]

while I have disabled ssh-rsa on the SSH tabby client

@Eugeny

@cayenne17 that algorithm list refers to host keys, i.e. the server authenticating itself to the client.

@Eugeny

@YEZI-HX

I’m having that issue. ;-;Windows Server2019

@Dan-Essin

It’s happening to me in 183
ssh from windows cmd.exe works fine

@felixf4xu

v1.0.183 same issue.

ssh from ubuntu 20 to ubuntu 18.

it fails only when I connect to remote ssh via «Profile and Connection» dialog. If I open a local terminal inside tabby and type ssh name@host and press enter to log in, it works and can connect to host.

@RavenKong

still happens in v.1.0.183.
Issue seems happen when duplicate a connection which already connected ( that connection has establish some port forwarding tunnel through a jump host).
If I disconnect the existing connection, and reconnect, no issue. Only happens when duplicating establish connexion.

Tested from windows client to a remote server through a jump host (bastion)
No issue tests with Putty/Kitty with same port fowarded and duplicating more connections.

@winkelement

I can confirm creating ssh connections via «Profile and Connection» dialog is broken for a while now. Connecting via CLI normally works just fine.

@NetAssisson

still happens in v.1.0.187.
I developed a virtual host Centos7 using VMware.
When I first connect, there is only one network adapter. In bash ssh@xxx.xxx.xxx.xxx works fine and on tabby works fine.
When I add a network adapter to the Centos7, The bash ssh@xxx.xxx.xxx.xxx works fine but on tabby, the connection was slow and I got an error.
X Timed out while waiting for handshake
Miraculously, when I delete the newly created network adapter, the connection in tabby is back to normal.

@shbearly

it has this issue in 1.0.184.
after restart of tabby, no issues. All is good.
But later(after several days), it’s not able to add/duplicatae new session.
I need to open almost 10 ssh with same server.
Existing session are not impacted.

It should be a logic issue, I believe.
If it’s a cert issue, it should happen all the time highly possiblly.

I got the issue point: when I create more than 10 connectio with same server. It will reject me.
The 11th will be rejected.

459217974

[SSH] Remote rejected opening a shell channel: Error: Unable to request a pseudo-terminal

when I connect to a jumpserver, I get this error:
[SSH] Remote rejected opening a shell channel: Error: Unable to request a pseudo-terminal

Eugeny

Should be fixed in the just-released alpha 99

459217974

emmm…. I’m using alpha 99 but get this error

Eugeny

Is it a «normal» Linux/UNIX machine or a network device? Can you connect to it using OpenSSH without the -T (don’t allocate PTY) flag?

459217974

It’s not a «normal» Linux/UNIX machine, It’s a jumpserver and it using the paramiko(python package) to simulate a terminal.
when I using -T flag, I can not connect to the server. logs:

ssh someone@jumpserver.address.com -p 2222 -T -v                                                                                                                      someone@localhost
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/someone/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to jumpserver.address.com [10.18.0.94] port 2222.
debug1: Connection established.
debug1: identity file /Users/someone/.ssh/id_rsa type 0
debug1: identity file /Users/someone/.ssh/id_rsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_dsa type -1
debug1: identity file /Users/someone/.ssh/id_dsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ed25519 type -1
debug1: identity file /Users/someone/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/someone/.ssh/id_xmss type -1
debug1: identity file /Users/someone/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version paramiko_2.4.1
debug1: no match: paramiko_2.4.1
debug1: Authenticating to jumpserver.address.com:2222 as 'someone'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:2Z1ekqP2dKrrLQbQwTyox5xMk80fqPgu6J6WRFiWTeg
debug1: Host '[jumpserver.address.com]:2222' is known and matches the RSA host key.
debug1: Found key in /Users/someone/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: Will attempt key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Will attempt key: /Users/someone/.ssh/id_dsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ecdsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ed25519 
debug1: Will attempt key: /Users/someone/.ssh/id_xmss 
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Server accepts key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Authentication succeeded (publickey).
Authenticated to jumpserver.address.com ([10.18.0.94]:2222).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LC_MESSAGES = en_US.UTF-8
debug1: Sending env LC_NUMERIC = en_US.UTF-8
debug1: Sending env LC_COLLATE = en_US.UTF-8
debug1: Sending env LC_MONETARY = en_US.UTF-8
debug1: channel 0: free: client-session, nchannels 1
Connection to jumpserver.address.com closed by remote host.
Transferred: sent 3024, received 1696 bytes, in 5.0 seconds
Bytes per second: sent 604.2, received 338.9
debug1: Exit status -1

and without -T flag:

ssh someone@jumpserver.address.com -p 2222 -v                                                                                                                         someone@localhost
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/someone/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to jumpserver.address.com [10.18.0.94] port 2222.
debug1: Connection established.
debug1: identity file /Users/someone/.ssh/id_rsa type 0
debug1: identity file /Users/someone/.ssh/id_rsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_dsa type -1
debug1: identity file /Users/someone/.ssh/id_dsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa type -1
debug1: identity file /Users/someone/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/someone/.ssh/id_ed25519 type -1
debug1: identity file /Users/someone/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/someone/.ssh/id_xmss type -1
debug1: identity file /Users/someone/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
debug1: Remote protocol version 2.0, remote software version paramiko_2.4.1
debug1: no match: paramiko_2.4.1
debug1: Authenticating to jumpserver.address.com:2222 as 'someone'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:2Z1ekqP2dKrrLQbQwTyox5xMk80fqPgu6J6WRFiWTeg
debug1: Host '[jumpserver.address.com]:2222' is known and matches the RSA host key.
debug1: Found key in /Users/someone/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: Will attempt key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Will attempt key: /Users/someone/.ssh/id_dsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ecdsa 
debug1: Will attempt key: /Users/someone/.ssh/id_ed25519 
debug1: Will attempt key: /Users/someone/.ssh/id_xmss 
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Server accepts key: /Users/someone/.ssh/id_rsa RSA SHA256:h361ANBt9D1tBCNROOANlucHohfXReWhsalPkxB9Xgs
debug1: Authentication succeeded (publickey).
Authenticated to jumpserver.address.com ([10.18.0.94]:2222).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LC_MESSAGES = en_US.UTF-8
debug1: Sending env LC_NUMERIC = en_US.UTF-8
debug1: Sending env LC_COLLATE = en_US.UTF-8
debug1: Sending env LC_MONETARY = en_US.UTF-8

and then connect succeed.

stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks unless you comment.
Thank you for your contributions.

BenitzCoding

I’m having that issue. ;-;

Issues-translate-bot

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.


I’m having that issue. ;-;

antvig

Hi ! Also having the issue when trying to connect to a standard linux remote machine.

in bash ssh root@000.000.000.00 works fine but with a SSH connexion, I have the error :

 SSH  Loading private key: file://C:Usersant.sshid_rsa
 X  All configured authentication methods failed
 SSH   X  Remote rejected opening a shell channel: Error: Not connected

boxker

I’m having that issue. ;-;

b10c77

Having the issue as well, can this be when using an external private key file?

EDIT: it’s probably because I’m using the file in PEM format

anzepintar

I am having this issue too. It gives me this error in tabby, but works fine in putty.

luddystefenson

I’m having this issue as well. MobaXTerm connects fine with the same IP, Private key, port, and everything. Doesn’t work in Tabby.

SSH X Remote rejected opening a shell channel: Error: Not connected

anzepintar

I managed to get it working for me by generating my key in ed255519 ssh-keygen -t ed25519 -C "your@email.address" and generating it with password.

Gypsying

I’m having this issue as well….
Any methods to solve this issue?

459217974

@Eugeny Can you reopen this issue? It seems that many people still encounter this issue. Opening this issue can get more attention. Maybe this problem can be fixed.

accountnujen

точно такая же ошибка на ubuntu 22. Termius запускается без ошибки.

I managed to get it working for me by generating my key in ed255519 ssh-keygen -t ed25519 -C "your@email.address" and generating it with password.

I tried to do that, but it didn’t work.

accountnujen

я проверил. Дело в версии ОС. Если на сервер поставить Ubuntu 22, то будет ошибка, а на версии Ubuntu 20 такой ошибки нет. Возможно, это проблема в каком-то сертификате, который истёк.

Issues-translate-bot

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.


I checked. It’s the OS version. If you put Ubuntu 22 on the server, then there will be an error, but there is no such error on the Ubuntu 20 version. Perhaps this is a problem in some certificate that has expired.

anzepintar

‎I‎ проверил. Дело в версии ОС. Если на сервер поставить Ubuntu 22, то будет ошибка, а на версии Ubuntu 20 такой ошибки нет. Возможно, это проблема в каком-то сертификате, который истёк.

It works fine for me on Ubuntu 22.04

Issues-translate-bot

The translator bot has detected that this issue body’s language is not English, and has translated it automatically.


‎I‎ checked. It’s the OS version. If you put Ubuntu 22 on the server, then there will be an error, but there is no such error on the Ubuntu 20 version. Perhaps this is a problem in some certificate that has expired.

It works fine for me on Ubuntu 22.04

Solved — user error — i fucked up and sorry for wasting everyone’s time.

Hi everybody,
So I have a pretty fresh install of Arch (maybe a week or 2 old now) and I had ssh server up and running no problem until the PC I was logged in from crashed and now I cant log back in, just a standard «connection refused» message. Edit: using putty I get standard connection refused, using powershell i get connection refused, ant using terminus (which I usually use I used putty and powershell to troubleshoot maybe it was the client I thought at one point) i get connect ECONNREFUSED 192.168.1.162:22 —> Remote rejected opening a shell channel: Error: Not Connected
I did all the standard troubleshooting like making sure the service is up and running, port open (verified with nmap), ip conflicts check (arp-scan), the server and client on same LAN I don’t open these machines/ports to WAN, I also ssh’d into the server from itself to make sure the install and config was good.  So I checked everything I could think of but still nothing.
I then checked with ‘journalctl -u sshd’ and got these messages:

pam_unix(sudo:session): session opened for user root(uid=0) by art(uid=1000)
pam_unix(sudo:session): session closed by user root
pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
        art  : TTY=pts/0 ; PWD=/srv/http ; USER=root ; COMMAND=/usr/bin/systemctl status sshd
pam_unix(sudo:session): session opened for user root(uid=0) by art(uid=1000)
pam_unix(sudo:session): session closed by user root
pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
        art  : TTY=pts/0 ; PWD=/srv/http ; USER=root ; COMMAND=/usr/bin/iptables —list-rules
Accepted password for art from 192.168.1.162 port 56216 ssh2
Received disconnect from 192.168.1.162 port 56216:11: disconnected by user
Disconnected from user art 192.168.1.162 port 56216
Stopping OpenSSH Daemon …
sshd.service: Deactivated successfully.
Stopped OpenSSH d-Daemon.
sshd.service: Consumed 11.869s CPU time.
— Boot bunchanumbers —
Started OpenSSH Daemon
Server listening on 0.0.0.0 port 22
Accepted password for art from 192.168.1.162 port 45030 ssh2
pam_unix(sudo:auth): conversation failed
pam_unix(sudo:auth): auth could not identify password for [art]
pam_systemd_home(sudo:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Received disconnect from 192.168.1.162 port 45030:11: disconnected by user
Disconnected from user art 192.168.1.162 port 45030

Edit: By the way the Arch machine has static IP of 192.168.1.162 …. in case that is any help

So I searched around for pam, but I never activated pam and in fact I specifically remember changing the sshd_config file to specifically tell it that I don’t want to use pam right now.

Some additional info that might help:  I did generate public private keys using ssh-keygen ed25519 in order to migrate over to using pam and key/signature verification in he future but I never changed any configs to reflect that and havent restarted the machine/daemon since I generated those keys (except when I rebooted but the issue started before that reboot).

Any help would be greatly appreciated.

Last edited by 4rty (2021-04-17 16:45:41)

When I want to connect to my server like this

ssh -a username@my-server.de -p 22

it gives me two error messages:

PTY allocation request failed on channel 0
shell request failed on channel 0

When I use the parameter -T the first error message goes away.
But how to fix the second one?
I can’t connect. To other servers I can connect without any problems.

I’m on MAC OS 10.9.

The parameter -v shows me this debug output:

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to xxx.your-server.de [188.40.3.15] port 22.
debug1: Connection established.
debug1: identity file /Users/xxx/.ssh/id_rsa type -1
debug1: identity file /Users/xxx/.ssh/id_rsa-cert type -1
debug1: identity file /Users/xxx/.ssh/id_dsa type -1
debug1: identity file /Users/xxx/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version mod_sftp/0.9.8
debug1: no match: mod_sftp/0.9.8
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 55:f5:ca:ca:01:45:0f:7b:71:0a:1f:ba:9e:25:17:fb
debug1: Host 'xxx.your-server.de' is known and matches the RSA host key.
debug1: Found key in /Users/xxx/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/xxx/.ssh/id_rsa
debug1: Trying private key: /Users/xxx/.ssh/id_dsa
debug1: Next authentication method: password

After I enter the password, I get this:

debug1: Authentication succeeded (password).
Authenticated to xxx.your-server.de ([xxx.xxx.3.15]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = de_DE.UTF-8
shell request failed on channel 0

finnmglas's user avatar

finnmglas

1,4984 gold badges21 silver badges36 bronze badges

asked Nov 19, 2014 at 16:15

user1895268's user avatar

5

PTY allocation request failed on channel 0

There is a limit of 256 pseudo terminals on a system. Maybe you have an application that is leaking pseudo terminals. Use

lsof /dev/pts/*

to see what processes have open pseudo-terminals

shell request failed on channel 0

I was getting this error (without PTY allocation error). It turns out that one of my applications (QtCreator 3.0.?) was leaking Zombie processes. Other users were able to log in so I might have been hitting my per user process quota (if there is such a thing). I’ve updated to QtCreator 3.3. So far so good.

answered Jan 23, 2015 at 18:55

vharron's user avatar

vharronvharron

1,10211 silver badges19 bronze badges

2

I had the exact same error trying to connect via ssh to my server. As I can see you’re using a server provided by Hetzner connecting to it on port 22:

debug1: Connecting to xxx.your-server.de [188.40.3.15] port 22.

The offical wiki/documention from Hetzner says:

Protocol for encrypted remote diagnostics for servers/computers(consoles). The SSH port to be used is 222.

So you have to connect via port 222:

ssh -p 222 username@my-server.de

answered Jan 1, 2018 at 14:37

ThreeCheeseHigh's user avatar

ThreeCheeseHighThreeCheeseHigh

1,3905 gold badges21 silver badges40 bronze badges

2

I solved a similar problem with one of our users who was used only for ssh port forwarding so he don’t need to have access to PTY and it was prohibited in .ssh/authorized_keys file:

no-pty ssh-rsa AAA...nUB9 someuser

So when you tried to log in to this user, only message

PTY allocation request failed on channel 0

was returned. So check your user’s authorized_keys file.

answered Feb 7, 2017 at 11:48

Ondrej Homolka's user avatar

shell request failed on channel 0

mean you don’t have shell or remote commands access, fix your user permission on server to have shell access or if you just want tunneling use -N and -T options

answered Jul 31, 2018 at 10:19

ewwink's user avatar

ewwinkewwink

17.9k2 gold badges43 silver badges54 bronze badges

3

Try this:

vi /etc/security/limits.d/20-nproc.conf
*          soft    nproc     4096   # change to 65535 
root       soft    nproc     unlimited

answered Aug 2, 2018 at 3:59

xmduhan's user avatar

xmduhanxmduhan

93011 silver badges14 bronze badges

1

Just add these lines to your /etc/mtab and /etc/fstab, and reboot the system.

none    /dev/pts    devpts    defaults    0    0

Rudie's user avatar

Rudie

51.2k42 gold badges130 silver badges172 bronze badges

answered May 12, 2015 at 12:41

Mansur Ul Hasan's user avatar

6

just found out, what was the problem in my case (provider strato):
I had the same problem with output «shell request failed on channel 0» in the end.

I have to use the master password with the web-domain name as login. (In German
www.wunschname.de, where wunschname is your web-address.)

A ssh login with sftp-user names and the corresponding passwords is without success. (Although scp and sftp works with these sftp users!)

answered Mar 17, 2019 at 9:54

feli_x's user avatar

feli_xfeli_x

1471 silver badge8 bronze badges

It’s an old question, but if someone gets here like me…

This might be result of a wrong date in the server. If you are working with an embedded system this might be the cause… So check your date:

$ date

answered Jul 12, 2018 at 18:42

Ian Koerich Maciel's user avatar

I also faced the same issue. Just restarting my servers solved the issue.

answered Jun 7, 2019 at 7:32

Vivek Garg's user avatar

Vivek GargVivek Garg

1,9971 gold badge18 silver badges17 bronze badges

rebooting the instance from AWS console worked for me. There was a service that was leaking file connections that lsof helped find.

answered Jan 15, 2018 at 6:09

randhir singh's user avatar

This is what which helped me from the various answers provided.

  • Try logging in as root, that will get you in most of the times
  • Try logging in as a different user, it successful, it means that the problem is with a specific account & it implies that there are some process(es) already started by the problematic account which are consuming resources preventing login(most likely no of processes)
  • Increase the limit in /etc/security/limits.d/20-nproc.conf as mentioned by xmduhan above
  • Try to ssh again, it should work

answered Apr 17, 2020 at 0:33

Aejaz's user avatar

AejazAejaz

1008 bronze badges

Just rebooting a AWS instance works for me to clear the error shell request failed on channel 0

answered Mar 27, 2020 at 12:03

Kiruthika kanagarajan's user avatar

If you come to this Q&A for sftp while ssh is working, and you are getting:

subsystem request failed on channel 0

make sure /etc/ssh/sshd_config contains the following line(s):

# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server

They are there by default, but might have been removed for hardening purposes.

answered Apr 7, 2022 at 9:51

stackprotector's user avatar

stackprotectorstackprotector

8,9474 gold badges29 silver badges58 bronze badges

In my case, my sshd_config contained the value

PermitTTY No

I have to change this to

PermitTTY yes

To log in, I used
ssh user@address /bin/bash -i

This gives me a shell without PTY.
I then used sed to edit the file:

sed -e ‘/PermitTTY.*/PermitTTY yes/’ < /etc/ssh/sshd_config > sshd_new

Then

sudo -S cp sshd_new /etc/ssh/sshd_config

answered Aug 29, 2022 at 20:58

DAmann's user avatar

DAmannDAmann

1647 bronze badges

I encountered this error while using my git bash. I was able to solve this by re-installing git for windows. More details in this answer.

answered May 22, 2019 at 20:48

user3885927's user avatar

user3885927user3885927

3,2852 gold badges20 silver badges42 bronze badges

This was happening when I was trying to use sudo on ssh -t git@github.com after adding my local user’s public key to github

Just a head’s up to the google happy people like me

answered Oct 28, 2019 at 13:52

Jonathan DS's user avatar

Jonathan DSJonathan DS

2,0124 gold badges25 silver badges46 bronze badges

1

If you are trying to test your github ssh key write

ssh -T git@github.com

instead of ssh -t git@github.com

answered Aug 15, 2021 at 14:16

Ahmed Magdy's user avatar

Ahmed MagdyAhmed Magdy

9069 silver badges15 bronze badges

remounting /dev/pts works for me. you can do this remotely via ssh if you run ssh like this against the affected machine. ssh doesn’t request a tty when running commands like this and therefore this will allow you to remount /dev/pts remotely

ssh user@host — ‘mount -o remount,rw /dev/pts’

answered Feb 15, 2019 at 14:58

Slavek Jurkowski's user avatar

1

I occasionally see this when spinning up a VM. Our automation system starts applying updates, so depending on timing can hit an update to critical packages.

Upshot — this might happen if ssh or other related packages are being updated on the destination machine.

answered May 8, 2019 at 2:36

Criggie's user avatar

CriggieCriggie

1734 silver badges12 bronze badges

Should a person find themselves reading this QA while they are trying to ssh into a NetGear ReadyNAS device, be sure that the «rsync only» checkbox is unchecked in the dialog box for the ssh service in the admin interface.

answered Sep 26, 2019 at 18:03

Krista K's user avatar

Krista KKrista K

21.2k3 gold badges31 silver badges42 bronze badges

As you already found the -T flag that create a PTY, I will just respond to the second part:

shell request failed on channel 0

You should pass a command:

ssh username@my-server.de -p 22 help

After reading back the manual here: https://www.jenkins.io/doc/book/managing/cli/, I find it not really clear that it would not work without a command. But as stated by @U.V., the ssh interface is not a console interface, rather a connection utility. So you need to pass a command…

If someone from the «jenkins» team pass accross this post, it would be great that if we pass no command, the help would show up :-)

answered Feb 24, 2021 at 14:27

jehon's user avatar

jehonjehon

1,29414 silver badges19 bronze badges

try with option -NT

ssh -NT …

answered Sep 26, 2020 at 16:42

Shahid's user avatar

3

REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO REQUEST …

Web Saya ingin 50-100 Subscriber untuk channel youtube video berikut: Silahkan cek videonya untuk memastikan anda setuju dengan kontennya —— I want 50-100 Subscriber for the …
From my.freelancer.com


PEKERJAAN REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO …

Web Learn more about HTML PHP Browse Top Pengembang PHP
From freelancer.co.id


TRABALHOS DE REMOTE REJECTED OPENING A SHELL CHANNEL ERROR …

Web Learn more about HTML PHP Browse Top Desenvolvedores PHP
From freelancer.pt


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO REQUEST …

Web Rechercher des offres d’emploi ; Explorer. Programmation C# Parcourir les meilleurs Programmeurs C#
From fr.freelancer.com


REMOTE REJECTED OPENING A SHELL CHANNEL: ERROR: UNABLE TO …

Web 2020-05-02 Version: 1.0.108 Platform: darwin 19.4.0 Plugins: none Hello, I'm using the MAC system. When using SSH connections to connect to jumpserver, I reported …
From github.com


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO REQUEST …

Web We are looking for a charming, well-spoken, and detail-oriented person to answer customer phone calls and emails from 15:00 – 23:00 (US East Coast 9:00 AM to 6:00 PM). Must …
From freelancer.com


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO …

Web Browse Top Web-kehittäjiä Hire web-kehittäjä
From fi.freelancer.com


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO REQUEST …

Web Learn more about HTML PHP Browse Top Pembangun PHP
From my.freelancer.com


SSH CONNECTION · ISSUE #6350 · EUGENY/TABBY · GITHUB

Web Version: 1.0.176 Platform: Windows x64 10.0.22000 Plugins: docker Frontend: xterm Vault locking even if put the correct password. SSH Connecting to 192.168.68.123 SSH ! …
From github.com


SSH CONNECTING TO 37.221.92.103 SSH ! AGENT AUTH …

Web Agent auth selected, but no running agent is detected X read ECONNRESET SSH X Remote rejected opening a shell channel: Error: Not connected #7408. Change2K …
From github.com


TERMINUS NOT WORKING WITH MFA · ISSUE #3935 · …

Web 2021-06-02 SSH X Remote rejected opening a shell channel: Error: Not connected If I open a tab and ho ssh [email protected]_name I get prompted for creds. I enter the creds …
From github.com


SSH CONNECTION ECONNRESET · ISSUE #4171 · EUGENY/TABBY

Web 2021-07-08 SSH X Remote rejected opening a shell channel: Error: Not connected. SSH [SERVER]: session closed Press any key to reconnect. The text was updated …
From github.com


[SOLVED] SSHD PROBLEM — ANY HELP GREATLY APPRECIATED / …

Web 2021-04-17 Edit: using putty I get standard connection refused, using powershell i get connection refused, ant using terminus (which I usually use I used putty and powershell …
From bbs.archlinux.org


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO REQUEST …

Web Learn more about C# Programming HTML Browse Top Web Developers
From freelancer.ca


直连堡垒机失败:X ALL CONFIGURED AUTHENTICATION …

Web 直连堡垒机失败:X All configured authentication methods failed SSH X Remote rejected opening a shell channel: Error: Not connected #6704 Closed Reallyone opened this …
From github.com


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO REQUEST …

Web En İyi C# Programcıları için Göz Atın bir C# Programcısı İşe Alın
From tr.freelancer.com


REMOTE REJECTED OPENING A SHELL CHANNEL ERROR UNABLE TO

Web Need to deliver fresh air to an office/studio being built within a large garage that is underground. Building surveyor has requested ventilation to meet AS 1668.2 be …
From freelancer.co.uk


SSH PUBLIC KEY REMOTE REJECT TO UBUNTU 22.0.4 — ISSUES ANTENNA

Web 2022-07-16 I open the connection and tabby reports this error: SSH Loading private key: id_rsa X Failed to connect to agent SSH X Remote rejected opening a shell channel: …
From issueantenna.com


[SSH] REMOTE REJECTED OPENING A SHELL CHANNEL: ERROR: …

Web 2020-01-15 when I connect to a jumpserver, I get this error: [SSH] Remote rejected opening a shell channel: Error: Unable to request a pseudo-terminal
From github.com


a public key authentication is established between 2 machines (windows and linux)

when i attempt to connect from the first machine (OS: Centos 7) to the second machine (windows server) , a error message is showing :

shell request failed on channel 0

i execute ssh administrator@192.168.1.146 with -v to debug connection, this is the output :

OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to 192.168.1.146 [192.168.1.146] port 22.
debug1: Connection established.
debug1: identity file /home/docker/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version SSHBlackbox.10
debug1: no match: SSHBlackbox.10
debug1: Authenticating to 192.168.1.146:22 as 'administrator'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group14-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group14-sha1 need=32 dh_need=32
debug1: kex: diffie-hellman-group14-sha1 need=32 dh_need=32
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: ssh-rsa SHA256:yUlYQrtRhzqQ+5rGH01E1R4VO1uxEp6POxCIOSHwWOk
debug1: Host '192.168.1.146' is known and matches the RSA host key.
debug1: Found key in /home/docker/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/docker/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.1.146 ([192.168.1.146]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_GB.UTF-8
shell request failed on channel 0

when i try to connect to the windows machine from author terminal , he ask me to give the password of administrator user

Please help me i am stuck

I have a home and work computer, the home computer has a static IP address.

If I ssh from my work computer to my home computer, the ssh connection works but X11 applications are not displayed.

In my /etc/ssh/sshd_config at home:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

At work I have tried the following commands:

xhost + home HOME_IP
ssh -X home
ssh -X HOME_IP
ssh -Y home
ssh -Y HOME_IP

My /etc/ssh/ssh_config at work:

Host *
ForwardX11 yes 
ForwardX11Trusted yes

My ~/.ssh/config at work:

Host home
HostName HOME_IP
User azat
PreferredAuthentications password
ForwardX11 yes

My ~/.Xauthority at work:

-rw------- 1 azat azat 269 Jun  7 11:25 .Xauthority

My ~/.Xauthority at home:

-rw------- 1 azat azat 246 Jun  7 19:03 .Xauthority

But it doesn’t work

After I make an ssh connection to home:

$ echo $DISPLAY
localhost:10.0

$ kate
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
kate: cannot connect to X server localhost:10.0

I use iptables at home, but I’ve allowed port 22. According to what I’ve read that’s all I need.

UPD.
With -vvv

...
debug2: callback start
debug2: x11_get_proto: /usr/bin/xauth  list :0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 1: request x11-req confirm 1
debug2: client_session2_setup: id 1
debug2: fd 3 setting TCP_NODELAY
debug2: channel 1: request pty-req confirm 1
...

When try to launch kate:

debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 55486
debug2: fd 8 setting O_NONBLOCK
debug3: fd 8 is O_NONBLOCK
debug1: channel 2: new [x11]
debug1: confirm x11
debug2: X11 connection uses different authentication protocol.
X11 connection rejected because of wrong authentication.
debug2: X11 rejected 2 i0/o0
debug2: channel 2: read failed
debug2: channel 2: close_read
debug2: channel 2: input open -> drain
debug2: channel 2: ibuf empty
debug2: channel 2: send eof
debug2: channel 2: input drain -> closed
debug2: channel 2: write failed
debug2: channel 2: close_write
debug2: channel 2: output open -> closed
debug2: X11 closed 2 i3/o3
debug2: channel 2: send close
debug2: channel 2: rcvd close
debug2: channel 2: is dead
debug2: channel 2: garbage collecting
debug1: channel 2: free: x11, nchannels 3
debug3: channel 2: status: The following connections are open:
  #1 client-session (t4 r0 i0/0 o0/0 fd 5/6 cc -1)
  #2 x11 (t7 r2 i3/0 o3/0 fd 8/8 cc -1)

# The same as above repeate about 7 times

kate: cannot connect to X server localhost:10.0

UPD2
Please provide your Linux distribution & version number.
Are you using a default GNOME or KDE environment for X or something else you customized yourself?

azat:~$ kded4 -version
Qt: 4.7.4
KDE Development Platform: 4.6.5 (4.6.5)
KDE Daemon: $Id$

Are you invoking ssh directly on a command line from a terminal window?
What terminal are you using? xterm, gnome-terminal, or?
How did you start the terminal running in the X environment? From a menu? Hotkey? or ?

From terminal emulator `yakuake`
Manualy press `Ctrl + N` and write commands

Can you run xeyes from the same terminal window where the ssh -X fails?

`xeyes` - is not installed
But `kate` or another kde app is running

Are you invoking the ssh command as the same user that you’re logged into the X session as?
From the same user

UPD3

I also download ssh sources, and using debug2() write why it’s report that version is different
It see some cookies, and one of them is empty, another is MIT-MAGIC-COOKIE-1

Понравилась статья? Поделить с друзьями:
  • Remote ndis based internet sharing device что это как исправить windows
  • Remote mouse ошибка
  • Remote message system error 2146893044
  • Remote manipulator system fatal error что это
  • Remote manipulator system fatal error rfusclient exe not found