Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two EC2 instances that were created from the same AMI, which was created from the Amazon Linux AMI. These are running mysql in a master-slave configuration. The security group ("db") is configured to allow port 22 from instances running under security group "web".

So, I ssh into one of the web instances, and then ssh or scp to the database instances. This has been working fine for a while.

Today, however, I can no longer scp to one of the instances (the master). I can ssh into it just fine, and both scp and ssh work fine to the slave instance.

Running scp with -vv produces almost idential output, up to the debug2: line below, which is the last output when connecting to the master.

debug2: exec request accepted on channel 0
Sending file modes: C0775 77 <filename>

Any idea what is going on? I've tried re-starting the instance, and that didn't make any difference.


  Jan 10 19:02:59 <host> sshd[1987]: Accepted publickey for <user> from port 33285 ssh2
  Jan 10 19:02:59 <host> sshd[1987]: pam_unix(sshd:session): session opened for user <user> by (uid=0)

There were about 20 lines or so added to /var/log/audit/audit.log, all ending in res=success

share|improve this question
(1) Double check destination path is correct and writable? (2) The last line is correct, not an error. (3) Check /var/log/auth.log and /var/log/syslog for sshd error/warning. – John Siu Jan 9 '13 at 20:15
I am having a similar problem - I can ssh into my instance just fine; scp authenticates and connects (I see the MOTD) but doesn't transfer the file. – DNA Jan 27 '14 at 16:09

I fixed this issue by doing the following:

$ sudo vi /etc/ssh/sshd_config

Changed this:

# override default of no subsystems
Subsystem      sftp    /usr/libexec/openssh/sftp-server

To this:

# override default of no subsystems
Subsystem      sftp    internal-sftp

Then restarted the sshd service:

$ sudo service sshd restart
share|improve this answer

I find it easier to just run a python SimpleHTTPServer and run wget on other side to download file.

  • Add HTTP procotcol to be added in security config for all sources

  • run the following command in the directory in which file exists

    $ sudo python -m SimpleHTTPServer 80

  • on the receiving side, run the following command to download file

    $ wget

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.