Can't transfer file to Windows (SSH_MSG_UNIMPLEMENTED)
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 620
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 11
Description
Hi,
I'm working on a Web app that will transfer files to virtual machines, including Windows 7/8/10 VMs. I have installed OpenSSH 7.5 on those machines, but when I try to copy files to it, I get:
```
n.s.s.t.r.BouncyCastleRandom: Generating random seed from SecureRandom.
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size
n.s.s.DefaultConfig: Illegal key size or default parameters
n.s.s.DefaultConfig: Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy
n.s.s.t.TransportImpl: Client identity string: SSH-2.0-SSHJ_0.21.1
n.s.s.t.TransportImpl: Server identity string: SSH-2.0-OpenSSH_7.5
n.s.sshj.SSHClient: Key exchange took 0.374 seconds
n.s.sshj.SSHClient: Attempting to load key from: /etc/vmix/id_rsa
n.s.s.t.TransportImpl: Dying because - {}
net.schmizz.sshj.common.SSHException: Unexpected: SSH_MSG_UNIMPLEMENTED
at net.schmizz.sshj.AbstractService.notifyUnimplemented(AbstractService.java:63)
at net.schmizz.sshj.transport.TransportImpl.gotUnimplemented(TransportImpl.java:579)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:514)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:102)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:170)
at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
n.s.s.t.TransportImpl: Disconnected - PROTOCOL_ERROR
n.s.c.Promise: <> woke to: net.schmizz.sshj.transport.TransportException: Unexpected: SSH_MSG_UNIMPLEMENTED
net.schmizz.sshj.transport.TransportException: Unexpected: SSH_MSG_UNIMPLEMENTED
at net.schmizz.sshj.transport.TransportException$1.chain(TransportException.java:33)
at net.schmizz.sshj.transport.TransportException$1.chain(TransportException.java:27)
at net.schmizz.concurrent.Promise.deliverError(Promise.java:96)
at net.schmizz.concurrent.Event.deliverError(Event.java:74)
at net.schmizz.concurrent.ErrorDeliveryUtil.alertEvents(ErrorDeliveryUtil.java:34)
at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:599)
at net.schmizz.sshj.transport.Reader.run(Reader.java:67)
Caused by: net.schmizz.sshj.common.SSHException: [PROTOCOL_ERROR] Unexpected: SSH_MSG_UNIMPLEMENTED
at net.schmizz.sshj.AbstractService.notifyUnimplemented(AbstractService.java:63)
at net.schmizz.sshj.transport.TransportImpl.gotUnimplemented(TransportImpl.java:579)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:514)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:102)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:170)
at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
```
The key file is valid and the path is good. I can use scp from my Mac to copy to the same host without any problems.
I do call authPublickey, so I don't know what's happening. And yes, the user running the app do have access to the key file.
```
SSHClient sshClient= new SSHClient();
sshClient.addHostKeyVerifier(new PromiscuousVerifier());
sshClient.connect(clone.getAdresseIP());
sshClient.authPublickey("druide", "/etc/vmix/id_rsa");
sshClient.newSCPFileTransfer().upload(new FileSystemFile(artefact), "/Users/Druide/Desktop/");
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.