1

I am on Ubuntu 9.04 and am unable to scp files from my computer to a server. On the other hand, I am able to scp files from the server to my computer.

I suspect some ports are blocked on the the Router. If yes, what are they. Else, could there be any other problem.

EDIT: Today I bypassed the router and connected the broadband cable directly to the computer, and am not having any problem. However, if I connect via the router - I am faced with the above problem.

4
  • Are SSH running on both machines? On router, first try to switch off any filters you may have. Then tell the result, maybe we will figure something out. Sep 21, 2009 at 8:20
  • Can you ssh from your computer to your server? Try running scp with the -v option to show more debugging information. Adding more will increase debug information -vv, -vvv (up to three). Sep 21, 2009 at 17:25
  • Yes, I am able to SSH to the server. Oct 14, 2009 at 18:28
  • make/model of the router? Oct 14, 2009 at 18:56

3 Answers 3

1

One of the simplest ways to discover if the port is open on the target machine is to simply telnet to the port. You should get an SSH header message in return. For example:

telnet remote.machine 22
1
  • locke, the problem is not that ports are closed on the target machine. Because, I am able to scp files if I do not connect to the server via the router. Oct 14, 2009 at 18:44
0

I'd say it's unlikely to be a port issue since you can establish the connection, it's more likely to be a permissions issue on the folder you're copying to.

3
  • Not true. At my job, for example, I can connect to remote imap server, but not to imaps, because router analyzes packets and some ports are not in a whitelist. Sep 21, 2009 at 8:36
  • But the fact that he can scp one way means the ports for scp are open doesn't it? Although I'm not sure whether he means he can use the scp client on his pc to copy the stuff one way and not the other or if he means he runs scp on the server to do the copy one way and on the client to do it the other way.
    – Col
    Sep 21, 2009 at 9:32
  • Col - I do have permissions to copy to the destination - it is my home directory (on a *nix machine). Oct 14, 2009 at 18:27
0

It's apparently possible to allow SSH while blocking SCP. I wrote it up in an answer to another question:

The trick is in the authorized_keys file format. There are several options that allow the server to restrict SSH features based on what key was used to authenticate. The "command=" option allows the server administrator to attach a restriction on the public key -- something like stating that "any incoming connections that authenticate with this key will execute this command, regardless of what command might have been requested by the user".

I haven't tested this out, but that could explain why you can't get through to the server with SCP.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .