ssh works, scp hangs forever
I would like to copy files from my laptop to another machine - a headless TX2 -- over my home wifi network. Both my laptop and the TX2 are running Ubuntu 16.04 and both have the latest version of openssh-server (1:7.2p2-4ubuntu2.4). I've set up public key authentication so that ssh tx2 logs me onto the TX2 without a password. However, running scp -v test.txt tx2:~/test.txt stalls forever until I kill it with Ctl-C. The last line it prints before getting stuck is debug1: Sending command: scp -v -t ~/test.txt. I get the same problem when trying to scp in the other direction (from the TX2 to my laptop). sftp -v tx2 gets stuck in the same way after printing debug1: Sending subsystem: sftp
Some other answers indicate that the problem can lie with the login scripts printing to the console. However, my .bashrc on the TX2 is the Ubuntu default and the problem persists even if I delete it.