-
Notifications
You must be signed in to change notification settings - Fork 18k
x/crypto/ssh: 'no common algorithms' against ubnt device #12982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@bradfitz does it work if you uncomment this line? https://github.com/golang/crypto/blob/9fb97e878da8d908d467cb8c62408c93ed0107b9/ssh/cipher.go#L120 |
@cespare, that line no longer exists. |
@bradfitz I see it on master. https://github.com/golang/crypto/blob/master/ssh/cipher.go#L120 |
x/crypto has had improved error messages for a while as well. Git pull? when did you buy this thing? Improved arcfour was defined in 2006 (https://www.ietf.org/rfc/rfc4345.txt). If this is the state of their security, then I hope this device doesn't control anything important. |
Indeed, my x/crypto repo was stuck in the past. Applying this "fixes" it: diff --git a/ssh/cipher.go b/ssh/cipher.go
index 3e06da0..2fe79fc 100644
--- a/ssh/cipher.go
+++ b/ssh/cipher.go
@@ -117,7 +117,7 @@ var cipherModes = map[string]*streamCipherMode{
// insecure cipher, see http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf
// uncomment below to enable it.
- // aes128cbcID: {16, aes.BlockSize, 0, nil},
+ aes128cbcID: {16, aes.BlockSize, 0, nil},
}
// prefixLen is the length of the packet prefix that contains the packet length
diff --git a/ssh/common.go b/ssh/common.go
index 9fc739e..9dd77e6 100644
--- a/ssh/common.go
+++ b/ssh/common.go
@@ -28,6 +28,7 @@ var supportedCiphers = []string{
"aes128-ctr", "aes192-ctr", "aes256-ctr",
"aes128-gcm@openssh.com",
"arcfour256", "arcfour128",
+ "aes128-cbc",
}
// supportedKexAlgos specifies the supported key-exchange algorithms in Thanks! |
I've the same problem but was able to fix it by adding |
@dzlab, see "permit use of CBC ciphers" commit above. You can now add it to your https://godoc.org/golang.org/x/crypto/ssh#Config |
I have some of these little mFi mPower things (https://www.ubnt.com/mfi/mpower/) and they run a little Linux on 32-bit MIPS with 16 MB of RAM and dropbear ssh as the way to control it.
I wanted to use crypto/ssh against it, but I get "handshake failed: ssh: no common algorithms".
I modified the crypto/ssh code to show better errors, and I get:
Looks like it only does CBC.
I see there's an old bug about adding CBC ciphers (#4274) but it was closed as WorkingAsIntended.
Any possibility this can be opt-in in my ssh.ClientConfig?
/cc @hanwen @agl
The text was updated successfully, but these errors were encountered: