{"action":"created","issue":{"url":"https://api.github.com/repos/hierynomus/sshj/issues/402","repository_url":"https://api.github.com/repos/hierynomus/sshj","labels_url":"https://api.github.com/repos/hierynomus/sshj/issues/402/labels{/name}","comments_url":"https://api.github.com/repos/hierynomus/sshj/issues/402/comments","events_url":"https://api.github.com/repos/hierynomus/sshj/issues/402/events","html_url":"https://github.com/hierynomus/sshj/issues/402","id":299252775,"node_id":"MDU6SXNzdWUyOTkyNTI3NzU=","number":402,"title":"Authentication problem","user":{"login":"j0kkeri","id":36040597,"node_id":"MDQ6VXNlcjM2MDQwNTk3","avatar_url":"https://avatars0.githubusercontent.com/u/36040597?v=4","gravatar_id":"","url":"https://api.github.com/users/j0kkeri","html_url":"https://github.com/j0kkeri","followers_url":"https://api.github.com/users/j0kkeri/followers","following_url":"https://api.github.com/users/j0kkeri/following{/other_user}","gists_url":"https://api.github.com/users/j0kkeri/gists{/gist_id}","starred_url":"https://api.github.com/users/j0kkeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0kkeri/subscriptions","organizations_url":"https://api.github.com/users/j0kkeri/orgs","repos_url":"https://api.github.com/users/j0kkeri/repos","events_url":"https://api.github.com/users/j0kkeri/events{/privacy}","received_events_url":"https://api.github.com/users/j0kkeri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-22T07:55:53Z","updated_at":"2018-07-01T01:20:07Z","closed_at":null,"author_association":"NONE","body":"I have a problem authenticating to SFTP server:\r\n\r\n\r\n> WARNING: Server identification has bad line ending, was expecting a '\\r\\n' however got: '1' (hex: 31)\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter warn\r\n> WARNING: Will treat the identification of this server 'SSH-1.99-OpenSSH_7.3p1+sftpfilecontrol-v1.3-hpn14v11' leniently\r\n> net.schmizz.sshj.transport.TransportException: Socket closed\r\n> \tat net.schmizz.sshj.transport.TransportImpl.write(TransportImpl.java:454)\r\n> \tat net.schmizz.sshj.transport.TransportImpl.sendServiceRequest(TransportImpl.java:357)\r\n> \tat net.schmizz.sshj.transport.TransportImpl.reqService(TransportImpl.java:340)\r\n> \tat net.schmizz.sshj.AbstractService.request(AbstractService.java:74)\r\n> \tat net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:65)\r\n> \tat net.schmizz.sshj.SSHClient.auth(SSHClient.java:225)\r\n> \tat net.schmizz.sshj.SSHClient.auth(SSHClient.java:206)\r\n> \tat net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:292)\r\n> \tat net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:262)\r\n> \tat net.schmizz.sshj.SSHClient.authPassword(SSHClient.java:246)\r\n> \tat client.transfer.sshj.SSHJTransfer.initialize(Unknown Source)\r\n> \tat client.transfer.sshj.sftp.SSHJSFTPTransfer.initialize(Unknown Source)\r\n> \tat client.transfer.sshj.sftp.SSHJSFTPTransferSource.checkServerConnectionLogin(Unknown Source)\r\n> \tat client.job.TransferJobCheckServerSourceConnetion.execute(Unknown Source)\r\n> \tat client.job.AbstractJob.executeJob(Unknown Source)\r\n> \tat client.configuration.ConfigurationRunnerCheckServerConnection.execute(Unknown Source)\r\n> \tat org.quartz.core.JobRunShell.run(JobRunShell.java:223)\r\n> \tat org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)\r\n> Caused by: java.net.SocketException: Socket closed\r\n> \tat java.net.SocketOutputStream.socketWrite(Unknown Source)\r\n> \tat java.net.SocketOutputStream.write(Unknown Source)\r\n> \tat net.schmizz.sshj.transport.TransportImpl.write(TransportImpl.java:451)\r\n> \t... 17 more\r\n\r\nAlso:\r\n\r\n> FINE: Requesting password for [AccountResource] xxxxx@xxx.xxx.xxx.xxx\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter debug\r\n> FINE: Awaiting <<authenticated>>\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter error\r\n> SEVERE: Dying because - Broken transport; encountered EOF\r\n> net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF\r\n> \tat net.schmizz.sshj.transport.Reader.run(Reader.java:57)\r\n> \r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter info\r\n> INFO: Disconnected - UNKNOWN\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter debug\r\n> FINE: Got notified of net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter debug\r\n> FINE: Notified of net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter debug\r\n> FINE: Setting active service to null-service\r\n> helmi 22, 2018 8:35:39 AP. org.slf4j.impl.JCLLoggerAdapter error\r\n> SEVERE: <<authenticated>> woke to: net.schmizz.sshj.userauth.UserAuthException: Broken transport; encountered EOF\r\n\r\nI found other similar issues when disconnecting server but this happens in authenticating...\r\nI am using version 0.23.0\r\n\r\nI tried even ignoring this error but then ending up to \"Not connected\" error.\r\n\r\neg. WinSCP connects the same server with no errors."},"comment":{"url":"https://api.github.com/repos/hierynomus/sshj/issues/comments/401576705","html_url":"https://github.com/hierynomus/sshj/issues/402#issuecomment-401576705","issue_url":"https://api.github.com/repos/hierynomus/sshj/issues/402","id":401576705,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTU3NjcwNQ==","user":{"login":"jstevej","id":12628392,"node_id":"MDQ6VXNlcjEyNjI4Mzky","avatar_url":"https://avatars3.githubusercontent.com/u/12628392?v=4","gravatar_id":"","url":"https://api.github.com/users/jstevej","html_url":"https://github.com/jstevej","followers_url":"https://api.github.com/users/jstevej/followers","following_url":"https://api.github.com/users/jstevej/following{/other_user}","gists_url":"https://api.github.com/users/jstevej/gists{/gist_id}","starred_url":"https://api.github.com/users/jstevej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstevej/subscriptions","organizations_url":"https://api.github.com/users/jstevej/orgs","repos_url":"https://api.github.com/users/jstevej/repos","events_url":"https://api.github.com/users/jstevej/events{/privacy}","received_events_url":"https://api.github.com/users/jstevej/received_events","type":"User","site_admin":false},"created_at":"2018-07-01T01:20:07Z","updated_at":"2018-07-01T01:20:07Z","author_association":"NONE","body":"I tracked it down to java/net/schmizz/sshj/transport/kex/ECDHNistP.java, line 82. The ECNamedCurveGenParameterSpec it's creating comes from org.bouncycastle.jce.spec.ECNamedCurveGenParameterSpec, which is coming from the broken bouncycastle that ships with Android.\r\n\r\nI just replaced org.bouncycastle in all the imports with org.spongycastle, rebuilt sshj, and now it works.\r\n\r\nI'm not sure what that means for a long-term fix, but I can at least move forward now."}}
{"actor":{"display_login":"jstevej"}}