Cann't connect via SCP

Notes, tips, and other usefull things on how to use LogMX

Moderator: admin

Post Reply
column
Posts: 5
Joined: Thu Aug 13, 2015 8:24 pm

Cann't connect via SCP

Post by column »

Hello,

Trying to connect to remote log:

scp://root@192.168.1.25/opt/aaa/tst.log

Got: Error while reading scp://root@192.168.1.25/opt/aaa/tst.log


24/09/18 12:26:28.310 [INFO] (com.lightysoft.logmx.LogMX) Starting LogMX v5.5.0 (Professional Version, 20160607@195816)...
24/09/18 12:26:28.425 [FINE] (com.lightysoft.logmx.ProxyManager) ProxySelector.cache=ftp+http+https+socket: no proxy
24/09/18 12:26:57.745 [INFO] (com.lightysoft.logmx.MF) Opening "scp://root@192.168.1.25/opt/aaa/tst.log"...
24/09/18 12:26:57.765 [INFO] (com.lightysoft.logmx.SSH) Connecting to 192.168.1.25 port 22
24/09/18 12:26:57.769 [FINE] (com.lightysoft.logmx.ProxyManager) ProxySelector.select(socket://192.168.1.25:22) => use [DIRECT]
24/09/18 12:26:57.774 [INFO] (com.lightysoft.logmx.SSH) Connection established
24/09/18 12:26:57.790 [INFO] (com.lightysoft.logmx.SSH) Remote version string: SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2
24/09/18 12:26:57.790 [INFO] (com.lightysoft.logmx.SSH) Local version string: SSH-2.0-JSCH-0.1.53
24/09/18 12:26:57.790 [INFO] (com.lightysoft.logmx.SSH) CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
24/09/18 12:26:58.085 [INFO] (com.lightysoft.logmx.SSH) CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
24/09/18 12:26:58.262 [INFO] (com.lightysoft.logmx.SSH) CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
24/09/18 12:26:58.264 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_KEXINIT sent
24/09/18 12:26:58.264 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_KEXINIT received
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: ssh-rsa,ssh-dss
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: none,zlib@openssh.com
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server: none,zlib@openssh.com
24/09/18 12:26:58.265 [INFO] (com.lightysoft.logmx.SSH) kex: server:
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: server:
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: none
24/09/18 12:26:58.266 [INFO] (com.lightysoft.logmx.SSH) kex: client: none
24/09/18 12:26:58.267 [INFO] (com.lightysoft.logmx.SSH) kex: client:
24/09/18 12:26:58.267 [INFO] (com.lightysoft.logmx.SSH) kex: client:
24/09/18 12:26:58.267 [INFO] (com.lightysoft.logmx.SSH) kex: server->client aes128-ctr hmac-md5 none
24/09/18 12:26:58.267 [INFO] (com.lightysoft.logmx.SSH) kex: client->server aes128-ctr hmac-md5 none
24/09/18 12:26:58.279 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_KEXDH_INIT sent
24/09/18 12:26:58.282 [INFO] (com.lightysoft.logmx.SSH) expecting SSH_MSG_KEXDH_REPLY
24/09/18 12:26:58.422 [INFO] (com.lightysoft.logmx.SSH) ssh_rsa_verify: signature true
24/09/18 12:26:58.424 [WARNING] (com.lightysoft.logmx.SSH) Permanently added '192.168.1.25' (RSA) to the list of known hosts.
24/09/18 12:26:58.424 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_NEWKEYS sent
24/09/18 12:26:58.424 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_NEWKEYS received
24/09/18 12:26:58.427 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_SERVICE_REQUEST sent
24/09/18 12:26:58.430 [INFO] (com.lightysoft.logmx.SSH) SSH_MSG_SERVICE_ACCEPT received
24/09/18 12:27:03.432 [INFO] (com.lightysoft.logmx.SSH) Disconnecting from 192.168.1.25 port 22


How to solve this problem?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: Cann't connect via SCP

Post by admin »

Hello,

From the details you provided, I don't understand understand why you cannot connect, but here are a few things to try/consider:
  1. Please avoid using the SCP protocol, and try SFTP instead. Usually servers that handle SCP also support SFTP, which provides way more features and is more reliable (for example, you cannot use LogMX "AutoRefresh" feature through SCP because the SCP protocol doesn't handle random reads - SFTP does). To use SFTP instead of SCP in LogMX, in the"Open logs" dialog, just pick the Log Manager "SFTP file manager" in the drop down located at the top of the dialog.
  2. I see you try to connect using the "root" account. For security reasons, some Linux distributions don't allow root to open SSH channels (SCP/SFTP) by default. => Have you already tried with another account?
  3. Have you already tried to connect to this remote machine through another SCP/SFTP client using this root account?
  4. Are you trying to use "password" authentication, or "private key" authentication?
  5. Is the log (you provided here) cut out? Usually, between your last 2 log entries "SSH_MSG_SERVICE_ACCEPT received" and "Disconnecting", there are entries like:

    Code: Select all

    24/09/18 18:40:12.572 [INFO] (com.lightysoft.logmx.SSH) Authentications that can continue: password
    24/09/18 18:40:12.572 [INFO] (com.lightysoft.logmx.SSH) Next authentication method: password
    24/09/18 18:40:12.586 [INFO] (com.lightysoft.logmx.SSH) Authentication succeeded (password).
    
    It might be an indication of a problem... Right now it seems the client cannot list the possible authentications that can be used, and instead of that, it takes half a second to be disconnected.

Please let me know how it went with the above tips.
Xavier
Post Reply