ProxyCommand none breaks connection
See original GitHub issueAccording to man ssh_config
, setting ProxyCommand none
should disable the option entirely.
asyncssh
interprets none
as the command to execute as proxy command, thus returning the following error:
File "asyncssh/asyncssh/connection.py", line 434, in _connect
conn = await _open_proxy(loop, proxy_command, conn_factory)
File "asyncssh/asyncssh/connection.py", line 352, in _open_proxy
_, tunnel = await loop.subprocess_exec(_ProxyCommandTunnel, *command)
File "/usr/lib/python3.10/asyncio/base_events.py", line 1670, in subprocess_exec
transport = await self._make_subprocess_transport(
File "/usr/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport
transp = _UnixSubprocessTransport(self, protocol, args, shell,
File "/usr/lib/python3.10/asyncio/base_subprocess.py", line 36, in __init__
self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
File "/usr/lib/python3.10/asyncio/unix_events.py", line 800, in _start
self._proc = subprocess.Popen(
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1847, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'none'
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Use ProxyCommand for all SSH Connections - Super User
The example above will make it recursive, that every connection will use a proxy command, which is again ssh with another proxy command....
Read more >Problems with SSH ProxyCommand [closed]
The ProxyCommand option in ssh expects to STDIN & STDOUT of the command to be connected directly to the destination host ( %h...
Read more >SSH ProxyCommand example: Going through one host to ...
Explains going through one host to reach another using SSH ProxyCommand on a Linux or Unix with example about ssh to connect to...
Read more >Can't use a ProxyCommand-based SSH connection #285
If you need ProxyCommand to connect a host but it can be reached from the internet ... So, your proposed fix breaks a...
Read more >SSH ProxyCommand - Status-Q
Great! Small improvement: add “-e none” That makes the first ssh connection fully transparent so it won't break on control sequences. i.e. “ ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks very much - the fix for this is now available in the “develop” branch as commit https://github.com/ronf/asyncssh/commit/aaf7d2910993a87d059bddcbf04c42df3d017ca9 and will be included in the next release.
Hi @ronf,
thanks for the suggestions. I agree that would be cleaner, I updated the PR accordingly.
As for the use case: I’m assuming having
ProxyCommand none
is useful for cases in which you need a proxy to access all resources but a few internal ones, something like this:edit: swapped ordering, leaving the more generic option last