[squid-users] sftp through Squid: sftp error with proxy: command-line line 0 bad protocol 2 host key algorithms +ssh-dss

Matus UHLAR - fantomas uhlar at fantomas.sk
Tue Jun 14 07:16:51 UTC 2022


On 13.06.22 15:17, Roberto Carna wrote:
>Dear all, I have an Ubuntu 22.04 with Squid package, and I've
>configured it in order to let pass ssh protocol to Internet.
>
>From the own proxy, if I execute:
>
>$ sftp -v -oConnectTimeout=20 -oPoxyCommand='nc -X connect -x
>10.12.1.1:8080 %h %p' -oPort 60000 user at x.x.x.x
>
>I can login successfully.
>
>But if I try to connect with sftp from a host behind the proxy 10.12.1.1:8080:
>
>$ sftp -v -oHostKeyAlgorithms=+ssh-dss -oConnectTimeout=20
>-oPoxyCommand='nc -X connect -x 10.12.1.1:8080 %h %p' -oPort 60000
>user at x.x.x.x
>
>I get this error:
>
>command-line line 0: Bad protocol 2 host key algorithms '+ssh-dss'.
>Couldn't read packet: connection reset by peer.

you use option "HostKeyAlgorithms=+ssh-dss" and sftp does not like it.

>What can be the cause of this error, trying to use sftp from a host
>behind my Squid proxy?

This is not a squid issue, if it only happens with sftp.
it looks like your sftp client complaining, even without using proxy.

btw I use "connect-proxy" command instead of "nc"

-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux IS user friendly, it's just selective who its friends are...


More information about the squid-users mailing list