yokawasa / kubectl-plugin-ssh-jump

A kubectl plugin to access nodes or remote services using a SSH jump Pod
Apache License 2.0
172 stars 18 forks source link

Fix connection closed by remote host issue (closed by unknown port 65535) #20

Closed yokawasa closed 2 years ago

yokawasa commented 2 years ago

Description

Fix https://github.com/yokawasa/kubectl-plugin-ssh-jump/issues/16

RSA was deprecated in OpenSSH 8.8 according to OpenSSH 8.8 release note. The issue was caused when a local openssh version is 8.8+. Therefore the following options need to be added in all ssh connections (from your local to ssh jump host & from your local to k8s node)

options to add: -o HostkeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa

In https://github.com/yokawasa/kubectl-plugin-ssh-jump/pull/17, the options above was added only to ssh connection from your local to k8s node via ssh jump. But these weren't added to ssh connections specified in ProxyCommand. Therefore add the options to ssh connections specified in ProxyCommand as well in the PR