All of lore.kernel.org
 help / color / mirror / Atom feed
* syntax problems with scp/rsync
@ 2006-09-11 15:21 Karthik Vishwanath
  2006-09-12  6:58 ` Ray Olszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Karthik Vishwanath @ 2006-09-11 15:21 UTC (permalink / raw)
  To: linux-newbie

Hello,

I seem to be having some difficulty using scp and rsync with the most
basic commands giving me problems:

$ scp kvh1@godzilla.acpub.duke.edu:FN* .
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 [...] [[user@]host2:]file2

$ rsync kvh1@godzilla.acpub.duke.edu:FN* .
rsync  version 2.6.6  protocol version 29
...
rsync error: syntax or usage error (code 1) at main.c(897)

However, both commands (listed below) work fine: 
$ scp t* kvh1@godzilla.acpub.duke.edu:
$ rsync t* kvh1@godzilla.acpub.duke.edu:


What is going on to cause the incorrect syntax in attempting to retrieve 
files from the remote host? 


Thanks,

-K

--------------
Never express yourself more clearly than you are able to think
- Niels Bohr

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: syntax problems with scp/rsync
  2006-09-11 15:21 syntax problems with scp/rsync Karthik Vishwanath
@ 2006-09-12  6:58 ` Ray Olszewski
  2006-09-12 12:42   ` Karthik Vishwanath
  0 siblings, 1 reply; 3+ messages in thread
From: Ray Olszewski @ 2006-09-12  6:58 UTC (permalink / raw)
  To: linux-newbie

Karthik Vishwanath wrote:
> Hello,
> 
> I seem to be having some difficulty using scp and rsync with the most
> basic commands giving me problems:
> 
> $ scp kvh1@godzilla.acpub.duke.edu:FN* .
> usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
>            [-l limit] [-o ssh_option] [-P port] [-S program]
>            [[user@]host1:]file1 [...] [[user@]host2:]file2
> 
> $ rsync kvh1@godzilla.acpub.duke.edu:FN* .
> rsync  version 2.6.6  protocol version 29
> ...
> rsync error: syntax or usage error (code 1) at main.c(897)
> 
> However, both commands (listed below) work fine: 
> $ scp t* kvh1@godzilla.acpub.duke.edu:
> $ rsync t* kvh1@godzilla.acpub.duke.edu:
> 
> 
> What is going on to cause the incorrect syntax in attempting to retrieve 
> files from the remote host? 

I don't use rsync here so focused on scp.

After verifying that I could use similar syntax here on my LAN with no 
errors, I went ahead and tried what you have above:

autovcr@firefly:~$ scp kvh1@godzilla.acpub.duke.edu:FN* .
The authenticity of host 'godzilla.acpub.duke.edu (152.3.233.25)' can't 
be established.
RSA key fingerprint is 04:53:67:16:20:e4:61:88:61:a8:25:f0:ff:54:7a:73.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.

In other words, it worked fine for me. That's using OpenSSH 1:4.3p2-3
from Debian-Sid, from bash on a vt.

So I'd suspect one of three things:

	1. a non-printing character in the command string. Likely only if you 
didn't actually retype the "kvh1@godzilla.acpub.duke.edu:FN* ." part 
between the two tries.

	2. a problem with your shell.

	3. You are using a non-standard ssh/scp program. Unlikely, since the 
error response matches exactly.

Some programs fail if wildcards expand ambiguously in the pwd (find is 
notorious for that, as an example), but I tested that here and scp 
doesn't do that.

Sorry I can't offer more help.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: syntax problems with scp/rsync
  2006-09-12  6:58 ` Ray Olszewski
@ 2006-09-12 12:42   ` Karthik Vishwanath
  0 siblings, 0 replies; 3+ messages in thread
From: Karthik Vishwanath @ 2006-09-12 12:42 UTC (permalink / raw)
  To: linux-newbie

On Mon, 11 Sep 2006, at 23:58, Ray Olszewski wrote to linux-newbie@vger.ker...:

> Karthik Vishwanath wrote:
> > Hello,
> > 
> > I seem to be having some difficulty using scp and rsync with the most
> > basic commands giving me problems:
> > 
> > $ scp kvh1@godzilla.acpub.duke.edu:FN* .
> > usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
> >            [-l limit] [-o ssh_option] [-P port] [-S program]
> >            [[user@]host1:]file1 [...] [[user@]host2:]file2
> 
> [snip'd]
> 
> So I'd suspect one of three things:
> 
> 	1. a non-printing character in the command string. Likely only if you 
> didn't actually retype the "kvh1@godzilla.acpub.duke.edu:FN* ." part 
> between the two tries.
> 
> 	2. a problem with your shell.
> 
> 	3. You are using a non-standard ssh/scp program. Unlikely, since the 
> error response matches exactly.
> 
> Some programs fail if wildcards expand ambiguously in the pwd (find is 
> notorious for that, as an example), but I tested that here and scp 
> doesn't do that.
> 

The mystery is solved, thanks to your notes above, Ray -- it did involve
wildcard expansions. The problem could be overcome by using:

scp 'kvh1@godzilla.acpub.duke.edu:FN*' .

bash had the "nullglob" option set, once removed, the single quotes were
not required. Thanks for the assistance.


-K

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-12 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-11 15:21 syntax problems with scp/rsync Karthik Vishwanath
2006-09-12  6:58 ` Ray Olszewski
2006-09-12 12:42   ` Karthik Vishwanath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.