-
Notifications
You must be signed in to change notification settings - Fork 166
Closed
netenglabs/suzieq
#812Description
I'm using another library (suzieq) which use asyncssh library.
I'm providing ssh config file with ProxyCommand option for trying to multiplex ssh session with netcat.
It's working with openssh client, but it seems that asyncssh does not replace the token %h
from the ProxyCommand
option :
[WORKER 0]: 2022-10-27 13:03:59,303 - asyncssh - INFO - [conn=252] Connected to SSH server at 10.38.119.40, port 22
[WORKER 0]: 2022-10-27 13:03:59,303 - asyncssh - INFO - [conn=252] Proxy command: nc -X 5 -x 127.0.0.1:2226 '' 22
[...]
[WORKER 0]: 2022-10-27 13:04:14,275 - asyncssh - INFO - [conn=252] Aborting connection
[...]
[WORKER 0]: 2022-10-27 13:04:14,275 - asyncssh - INFO - [conn=252] Connection closed
As you can see, we see ''
instead of 10.38.119.40
.
Here's my ssh config file :
host jumpserver
IdentityFile /home/suzieq/parquet/ssh_cred_conf/id_rsa
IdentitiesOnly yes
user xxxxxx
hostname x.x.x.x
Protocol 2
Port 22
StrictHostKeyChecking no
DynamicForward 127.0.0.1:2226
host * !jumpserver
Protocol 2
StrictHostKeyChecking no
ProxyCommand nc -X 5 -x 127.0.0.1:2226 %h %p
KexAlgorithms +diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
Just for information, I'm starting the ssh connection to jumpserver before running Python with this command : ssh jumpserver -F /home/suzieq/parquet/ssh_cred_conf/config -N &
Metadata
Metadata
Assignees
Labels
No labels