PowerShell / PowerShell/Win32-OpenSSH
Channel.invoke_shell() failed with latest version of Openssh
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
8.0.0.0
Server OperatingSystem
Windows Server 2016 Standard Evaluation
Client OperatingSystem
CentOS Linux release 7.6.1810 (Core)
What is failing
Python 3.6.7 (default, Dec 5 2018, 15:02:05)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>> cl = paramiko.SSHClient()
>>> cl.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>>> cl.connect(hostname=hostname, username=username, password=password)
>>> ch = cl.get_transport().open_session()
>>> ch.invoke_shell()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/myenv/lib64/python3.6/site-packages/paramiko/channel.py", line 72, in _check
return func(self, *args, **kwds)
File "/home/myenv/lib64/python3.6/site-packages/paramiko/channel.py", line 230, in invoke_shell
self._wait_for_event()
File "/home/myenv/lib64/python3.6/site-packages/paramiko/channel.py", line 1208, in _wait_for_event
raise e
paramiko.ssh_exception.SSHException: Channel closed.
Expected output
ch.invoke_shell() should be successful. This works in v7.7.2.0p1-Beta and below versions.
Actual output
paramiko.ssh_exception.SSHException: Channel closed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Python 3.6 reproduction at Channel.invoke_shell in paramiko/channel.py, using OpenSSH for Windows 8.0.0.0 and the older v7.7.2.0p1-Beta for comparison. Follow the linked troubleshooting and TTY/PTY guidance, then verify that the channel remains open and ch.invoke_shell() succeeds with the affected server version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100