You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "jiahui-qin (via GitHub)" <gi...@apache.org> on 2023/02/06 07:40:55 UTC
[GitHub] [mina-sshd] jiahui-qin opened a new issue, #317: How do I force the use of "RSA key" to connect to the remote side?
jiahui-qin opened a new issue, #317:
URL: https://github.com/apache/mina-sshd/issues/317
### Version
2.7.0
### Bug description
I notice sometimes sshd use "rsa key" connect remote, log like this
```
"Server at /192.168.218.182:830 presented unverified RSA key: SHA256:3lpuMiEyQ192HpfOAwjv+jhmliKfrG7w2Yl8x4bpfog"
```
and sometimes use "ec key"
```
Server at /192.168.218.182:830 presented unverified EC key: SHA256:nxJ168FpD/BD25sqDMQGv1ji6E11Fops01b0QUEOLxg
```
and the ec key never change.
I modified /root/.ssh/config file, but not work
```
HostKeyAlgorithms ssh-rsa
```
### Actual behavior
use "ec key" connect remote
### Expected behavior
force use "rsa key" connect remote
### Relevant log output
_No response_
### Other information
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf closed issue #317: How do I force the use of "RSA key" to connect to the remote side?
Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf closed issue #317: How do I force the use of "RSA key" to connect to the remote side?
URL: https://github.com/apache/mina-sshd/issues/317
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] chenss-1 commented on issue #317: How do I force the use of "RSA key" to connect to the remote side?
Posted by "chenss-1 (via GitHub)" <gi...@apache.org>.
chenss-1 commented on issue #317:
URL: https://github.com/apache/mina-sshd/issues/317#issuecomment-1425308610
I got a exception when not use root and this EC key log :
org.apache.sshd.common.SshException: No more authentication methods available.
How Can fix this ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
[GitHub] [mina-sshd] tomaswolf commented on issue #317: How do I force the use of "RSA key" to connect to the remote side?
Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf commented on issue #317:
URL: https://github.com/apache/mina-sshd/issues/317#issuecomment-1501175912
If you're trying to configure an OpenSSH server: its config file is normally `/etc/ssh/sshd_config`.
If it's an Apache MINA sshd server, set it in whatever config file it reads, if any, or configure it in the code via `SshServer.setKeyPairProvider()`.
If you're trying to configure an Apache MINA sshd client: first, make sure that it does read the file and does something with the HostKeyAlgorithms setting. (I don't think it does.) In Java code, you could create your own `ClientSessionImpl` subclass and override `resolveAvailableSignaturesProposal()` to return the algorithms you want.
BTW, I would recommend to set at least `rsa-sha2-512,rsa-sha2-256,ssh-rsa`. "ssh-rsa" is deprecated because it uses the cryptographically unsafe SHA1 hash. (RSA keys are fine, just this key exchange algorithm isn't.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org