You are Here:
Download Linux Lite 5.6 RC1 for testing today - See Release Announcements



X Close Ad
X Close Ad
scp fails between two Lite4.2 workstations

Author (Read 4354 times)

0 Members and 1 Guest are viewing this topic.

scp fails between two Lite4.2 workstations
« on: December 10, 2018, 11:28:46 PM »
 

openmind

  • New to Forums
  • *
  • 9
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 3.0 32bit

  • CPU: Intel 80686

  • MEMORY: 512mb

  • VIDEO CARD: nVidia
Just installed Lite4.2 on two workstations connected by the same IP subnet.  After installing ssh, applying all updates and selecting 'Allow" in the firewall, ssh login connections succeed normally.  When attempting to copy files between workstations using scp (the same host workstations with the same IP addresses as the successful ssh login) I obtain the following (actual username and IP address modified for security reasons):
scp -pr Documents/Projects 123.123.123.123:Documents
[email protected]'s password:
Welcome to Linux Lite 4.2 username

shell returned 1
The usernames are the same on both workstations.  The intent is to copy everything in sub-directory "Projects" on the sending host to the Documents directory on the receiving host.  Invoking the above with level 2 debugging yields:
scp -prvv Documents/Projects 123.123.123.123:DocumentsExecuting: program /usr/bin/ssh host 123.123.123.123, user (unspecified), command scp -v -r -p -t Documents
OpenSSH_7.6p1 Ubuntu-4ubuntu0.1, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "123.123.123.123" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 123.123.123.123 [123.123.123.123] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/username/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.1
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.1 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 123.123.123.123:22 as 'username'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:SPr7Roun6wlBLEpbczpdb3WbTreFRJ5FihYaswvSYpg
debug1: Host '123.123.123.123' is known and matches the ECDSA host key.
debug1: Found key in /home/username/.ssh/known_hosts:6
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug2: key: /home/username/.ssh/id_rsa ((nil))
debug2: key: /home/username/.ssh/id_dsa ((nil))
debug2: key: /home/username/.ssh/id_ecdsa ((nil))
debug2: key: /home/username/.ssh/id_ed25519 ((nil))
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/username/.ssh/id_rsa
debug1: Trying private key: /home/username/.ssh/id_dsa
debug1: Trying private key: /home/username/.ssh/id_ecdsa
debug1: Trying private key: /home/username/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
[email protected]'s password:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to 123.123.123.123 ([123.123.123.123]:22).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug1: Sending command: scp -v -r -p -t Documents
debug2: channel 0: request exec confirm 1
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
Welcome to Linux Lite 4.2 username
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed  ???
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
debug2: channel 0: write failed
debug2: channel 0: close_write
debug2: channel 0: send eow
debug2: channel 0: output open -> closed
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 1940, received 2408 bytes, in 0.6 seconds
Bytes per second: sent 3040.6, received 3774.1
debug1: Exit status -1

shell returned 1

The authentication succeeds but there is apparently a "read<=0 rfd 4 len 0" that fails resulting in the death of the 'scp' session.  Scp used to work in earlier Lite releases but fails in Lite4.2.  Any suggestions on a work around?  (The Lite4.2 scp client works with older versions of every other ssh server I've tried.)  Has the Lite4.2 ssh server been built incorrectly?
Sorry, just tried 'sftp' between the same two workstations and that produces:sftp [email protected]'s password: Received message too long 1466264675

shell returned 255
So the Lite4.2 ssh server breaks all file transfer methods in ssh.  :(

 
Last Edit: December 10, 2018, 11:44:18 PM by openmind
 


Re: scp fails between two Lite4.2 workstations
« Reply #1 on: December 11, 2018, 07:22:17 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1288
    Posts
  • Country: us
  • Reputation: 197
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 5.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
1) Hard to tell from your post because you obfuscate them, and you probably are not trying to do this, but two computers on the same subnet can't have the same numerical address.

2) You may have to pass the -t option twice with SCP depending on what you are trying to do.

https://stackoverflow.com/questions/24795377/running-a-remote-command-through-ssh-but-in-the-background
https://unix.stackexchange.com/questions/278284/why-does-scp-fail-when-requesttty-force-option-is-enabled
3) Binary and TTY code are not the same.
 
4) What's the point of a Desktop OS on a server if you're not going to use the desktop GUI?

5) I use SFTP and SSH all the time with no problems on Linux Lite, Debian 9, and Windows 10 machines. It's definitely not broken.

TC
Last Edit: December 11, 2018, 07:30:14 AM by trinidad
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: scp fails between two Lite4.2 workstations
« Reply #2 on: December 11, 2018, 09:32:23 AM »
 

openmind

  • New to Forums
  • *
  • 9
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 3.0 32bit

  • CPU: Intel 80686

  • MEMORY: 512mb

  • VIDEO CARD: nVidia
Reply to comments to date:1) of course not.  Only the output and debug data of the sending host is shown and only the target host IP appears in that output.  As indicated, IP addresses have been obscured for security reasons.
2) The '-t' option doesn't appear in the scp man page and was not supplied on the command lines shown.  The use of '-t' is entirely internal to the scp file transfer protocol.
3) Again, the exact same send command works fine on other ssh server installations and used to work on earlier Lite releases.  Everything shown in the debug log is reflective of the internal scp protocol and not intended or implied by my command ('scp -prvv SourceDir hostip:destdir' [the 'p' option preserves file dates and modes, the 'r' option indicates recursive copy of everything in the source directory including any sub-directory structure, the double 'v' is level 2 debug used only because it isn't working]).  This is a very powerful tool I would like to continue to use but now it's broke.

4) Both workstations are laptops and the ssh protocols are being used to transfer files between them.  Very common practice that I use all the time.  That is why I discovered it was broken in this latest Lite release.

5) I do too as I said.  Apparently only the Linux Lite4.2 ssh package is broken for both scp and sftp to the Lite4.2 ssh server.  The ssh server side (sshd) is not included in the Lite4.2 install ISO.  It had to be installed manually using the Synaptic Package Manager as indicated at the beginning of the post (the SPM automatically takes care of all necessary dependencies).  After that, the Lite4 firewall had to be configured to allow incoming connections.  The Lite4.2 server (sshd) works for ssh logins but not either scp or sftp.  If it's not broken then why doesn't it work?  As I said, it used to work fine and I depend on it to keep a number of workstations current.
 

Re: scp fails between two Lite4.2 workstations
« Reply #3 on: December 12, 2018, 11:36:23 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1288
    Posts
  • Country: us
  • Reputation: 197
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 5.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
Stepping completely over the rabbit hole of opinion here: Linux Lite and its UI is designed for new Linux users coming from Windows. Login to a secure shell first (TTY of the host). Run the SCP command from there remembering you are then on the host not the client and using plain Unix spacing and file paths (syntax). This should eliminate the long message error. Should work fine. Otherwise run SFTP from Thunar SFTP://192.xx.xx.xx or 10.xx.xx.xx as the case me be. The SSH server and the SSH client in Linux Lite are integrated for desktop GUI usage, assuming that more seasoned Linux users don't need instructions. Depending on the shell the Unix CLI syntax of SSH can vary in minor ways from distro to distro and file manager to file manager. Also when backgrounding (not headless) you can end up short a TTY depending how the server is configured. If your problems continue (though they should not) you can remove the welcome message and link from the host side prompt and then CLI from the client side.

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: scp fails between two Lite4.2 workstations
« Reply #4 on: December 12, 2018, 01:04:36 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8081
    Posts
  • Country: nz
  • Reputation: 754
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.4 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Trindad is right, Linux Lite is a gateway operating system, it's there for people to try their first Linux, then move onto other distros. If some of the more technically advanced features of LL don't function the way people expect, I'm not particularly bothered. Having said that there are some good, technical minds here.

Sent from my Mobile phone using Tapatalk

 

Re: scp fails between two Lite4.2 workstations
« Reply #5 on: December 12, 2018, 05:07:03 PM »
 

openmind

  • New to Forums
  • *
  • 9
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 3.0 32bit

  • CPU: Intel 80686

  • MEMORY: 512mb

  • VIDEO CARD: nVidia
Thank you Jerry and Trindad for your suggestions and comments on the scp/sftp session failures now occurring in Linux Lite4.2.  I understand that Linux Lite has specific goals with a specific target audience as most published projects do.  Targeting Windows users transitioning to Linux on the desktop is a worthy goal which I heartily support (one of the workstations referred to in this post used to be a Windows 7 laptop).  It would therefore seem important to us both that capabilities available in Linux Lite work properly without a lot of trouble.  Transitioning Windows users, unfamiliar with the internals and configuration of the environment they are attempting to use, would become understandably discouraged with Linux on the desktop if capabilities they need to use (e.g., transferring files between their Windows and Linux systems) do not work as they are supposed to.  A Windows user encountering such difficulties would be likely abandon their Linux transition plan.
My efforts so far to resolve this problem have resulted in the discovery that the Lite4.2 'sshd' is configured to authenticate and configure sessions with PAM (/etc/ssh/sshd_config: 'UsePAM yes') and that PAM is configured to post a dynamic motd (/run/motd.dynamic) in two places '/etc/pam.d/login' and '/etc/pam.d/sshd'.  Commenting out the configuration line /etc/pam.d/sshd: 'session optional pam_motd.so  motd=/run/motd.dynamic' does remove the extensive "blather" from the dynamic motd in 'ssh' logins but so far 'sftp' sessions still fail with "Received message too long 1466264675" and 'scp -p sourcefile localhost:/tmp' attempts still also fail after successful authentication.  I'm still not sure what received message is still too long but will continue to work on a resolution and let you know what happens.
 

Re: scp fails between two Lite4.2 workstations
« Reply #6 on: December 13, 2018, 12:46:28 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8081
    Posts
  • Country: nz
  • Reputation: 754
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.4 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Ask you average Joe or grandma on the street about configuring sessions with PAM and your most likely to get this kind of look...



That's our target audience, not those that are technically proficient.
 

Re: scp fails between two Lite4.2 workstations
« Reply #7 on: December 13, 2018, 01:27:29 PM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1288
    Posts
  • Country: us
  • Reputation: 197
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 5.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
It's a desktop OS. New users coming from Windows expect to use a GUI file manager for SFTP and/or Samba. They also expect to work with their files on the desktop in the same fashion. NOTHING is broken in Linux Lite SSH server and client, and missing capabilities that require configuration are up to the seasoned Linux user to do whatever they want with. If SFTP is not working for you now from Thunar it's certainly pebcak. Criticizing an OS by insisting something is broken that is not broken, while attempting to do something that the OS is not designed for is tantamount to criticizing a screwdriver for not being a wrench. Several other users here, including me could probably help you get SCP configured, though I am at a loss as to why given your curious setup in which I can see no particular productivity advantages, but I find myself disinclined to do so at this point given your insistence of "broken" regarding Linux Lite.

http://manpages.ubuntu.com/manpages/bionic/man1/scp.1.html

TC   
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: scp fails between two Lite4.2 workstations
« Reply #8 on: December 13, 2018, 02:23:31 PM »
 

openmind

  • New to Forums
  • *
  • 9
    Posts
  • Reputation: 1
  • Linux Lite Member

  • Linux Lite: 3.0 32bit

  • CPU: Intel 80686

  • MEMORY: 512mb

  • VIDEO CARD: nVidia
Thanks, Jerry, for emphasizing my point.  That is exactly why capabilities of an OS need to be verified to work before going out of beta.  Trindad, that is exactly how I'm using it on two laptops.  It is common practice to copy files between workstations used as desktop systems but in Lite4.2 it doesn't work anymore.  Eliminating all PAM banners doesn't help get either sftp or scp to work as they used to and as the documentation describes.  I'll use another distro that isn't broken.  There are plenty to choose from.
 

Re: scp fails between two Lite4.2 workstations
« Reply #9 on: December 13, 2018, 02:34:10 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8081
    Posts
  • Country: nz
  • Reputation: 754
  • Linux Lite Member
    • Linux Lite OS

  • Linux Lite: 5.4 64bit

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
OMG @trinidad our OS is broken, better pull it from all the mirrors asap.
 

Re: scp fails between two Lite4.2 workstations
« Reply #10 on: December 14, 2018, 04:37:46 PM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1288
    Posts
  • Country: us
  • Reputation: 197
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 5.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D

  • Kernel: 5.x
Well I got irritated enough to test this all again. Ethernet two LL machines together. SSH logons work normally, from the terminal and from Remmina. SFTP works perfectly from Thunar and Remmina and for fun I added pcmanfm to see if that broke it. Did not. SCP runs fine from the terminal though I used the IPv4 delimiter. * who cares when it's ethernet. Prompted for remote password, entered and file copied locally. Absolutely no issues. I'm sure it's pebcak. He dinked up his sshd configuration right from the start. An aside comment I have to say that Remmina's SFTP interface is outstanding and simply intuitive for new users of SFTP. In any case I can only say that LLs way of doing things may be too simple and effective for pseudo keyboard kings to do anything but mess up. Maybe we should make a more complicated version so they can feel productive. I also tested it connected to a Debian machine. Same results. I use SCP for copying server logs. That's it. SFTP is a far better alternative for new users, who the hell wants to type in all those file names, or look for them, and honestly Remmina makes it even nicer (more Windows like) to use.

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 


Tags: scp fail lite 4.2 sftp 
 

X Close Ad
X Close Ad

Download Linux Lite 5.6 RC1 for testing today - See Release Announcements