scp doesn´t recognizes 127.0.0.1* as filename

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

scp doesn´t recognizes 127.0.0.1* as filename

Eduardo Alvarenga
Hi there,

root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
ssh: 127.0.0.1-2007-11-26-18: Name or service not known

127.0.0.1-2007-11-26-18:31 is a directory

It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
directory.
Can anyone help?

This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4


Regards,

--
Eduardo Alvarenga

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn?t recognizes 127.0.0.1* as filename

Gilles Chehade-5
On Mon, Nov 26, 2007 at 07:24:09PM -0200, Eduardo Alvarenga wrote:

> Hi there,
>
> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known
>
> 127.0.0.1-2007-11-26-18:31 is a directory
>
> It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
> directory.
> Can anyone help?
>
> This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4
>
>
> Regards,
>

It is not the 127.0.0.1 part that is not recognized, it is the fact that
parameters which contain ':' are assumed to be of the form 'host:file'.
In this case, it is trying to scp the file '31' from host
127.0.0.1-2007-11-26-18

Gilles

--
Gilles Chehade
http://www.evilkittens.org/
http://www.evilkittens.org/blog/gilles/

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Chris Tankersley
In reply to this post by Eduardo Alvarenga
Eduardo Alvarenga wrote:

> Hi there,
>
> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known
>
> 127.0.0.1-2007-11-26-18:31 is a directory
>
> It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
> directory.
> Can anyone help?
>
> This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4
>
>
> Regards,
>
>  

That's because your directory name follows the same command pattern that
scp looks for:

<server>:<directory>

so it's looking to SCP a directory called '31' on the server
'127.0.0.1-2007-11-26-18' to the other server. If you put the filename
in quotes, does it work?

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Pierre Riteau-3
In reply to this post by Eduardo Alvarenga
On Nov 26, 2007 10:24 PM, Eduardo Alvarenga <[hidden email]> wrote:
>
> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known

What if you try 'scp -r ./127.0.0.1-2007-11-26-18:31 root@server:/u02/snap' ?

--
Pierre Riteau

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Eduardo Alvarenga
In reply to this post by Eduardo Alvarenga
It doesn4t work either.

root@cruz crash]# scp 127.0.0.1-2007-11-26-18\:31/ root@server:/u02/snap
ssh: 127.0.0.1-2007-11-26-18: Name or service not known

root@cruz crash]# scp "127.0.0.1-2007-11-26-18:31" root@server:/u02/snap
ssh: 127.0.0.1-2007-11-26-18: Name or service not known

Maybe a bug?

2007/11/26, Daniel Horecki <[hidden email]>:

>
> On Nov 26, 2007 10:24 PM, Eduardo Alvarenga <[hidden email]>
> wrote:
> > Hi there,
> >
> > root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server
> :/u02/snap
> > ssh: 127.0.0.1-2007-11-26-18: Name or service not known
> >
> > 127.0.0.1-2007-11-26-18:31 is a directory
> >
> > It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31
> is a
> > directory.
> > Can anyone help?
> >
>
> Add \ before ":" char:
>
> scp -r 127.0.0.1-2007-11-26-18\:31 root@server:/u02/snap
>
> Or you can add " " around name of directory. Should work. scp uses :
> to split between host and file to copy.
>
> morr
>
> --
> Daniel Horecki
> http://morr.pl
>



--
Eduardo Alvarenga

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn?t recognizes 127.0.0.1* as filename

Eduardo Alvarenga
In reply to this post by Gilles Chehade-5
By using ./ before the directory/filename it worked.
Is it expected?


Regards,

2007/11/26, Gilles Chehade <[hidden email]>:

>
> On Mon, Nov 26, 2007 at 07:24:09PM -0200, Eduardo Alvarenga wrote:
> > Hi there,
> >
> > root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server
> :/u02/snap
> > ssh: 127.0.0.1-2007-11-26-18: Name or service not known
> >
> > 127.0.0.1-2007-11-26-18:31 is a directory
> >
> > It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31
> is a
> > directory.
> > Can anyone help?
> >
> > This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4
> >
> >
> > Regards,
> >
>
> It is not the 127.0.0.1 part that is not recognized, it is the fact that
> parameters which contain ':' are assumed to be of the form 'host:file'.
> In this case, it is trying to scp the file '31' from host
> 127.0.0.1-2007-11-26-18
>


--
Eduardo Alvarenga

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn?t recognizes 127.0.0.1* as filename

Gilles Chehade-5
On Mon, Nov 26, 2007 at 07:52:43PM -0200, Eduardo Alvarenga wrote:
> By using ./ before the directory/filename it worked.
> Is it expected?
>

yes, the function that checks if the parameter is a hostname or a file
will consider that it is a file if '/' appears previous to ':'. Take a
look at colon() in src/usr.bin/ssh/misc.c

Gilles

--
Gilles Chehade
http://www.evilkittens.org/
http://www.evilkittens.org/blog/gilles/

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Philip Guenther-2
In reply to this post by Eduardo Alvarenga
On Nov 26, 2007 2:24 PM, Eduardo Alvarenga <[hidden email]> wrote:
> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known
>
> 127.0.0.1-2007-11-26-18:31 is a directory
>
> It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
> directory.
> Can anyone help?

As indicated by the error message, the issue isn't the 127.0.0.1
prefix but rather the colon.  If there's a colon before the first
slash in an argument, then scp will treat it as a host:filename
specification.  If you want it to treat such a name as local, then
prefix it with "./", ala:
        scp -r ./127.0.0.1-2007-11-26-18:31 root@server:/u02/snap


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Greg Thomas-3
In reply to this post by Eduardo Alvarenga
It's the colons, not the 127.0.0.1.

On Nov 26, 2007 1:24 PM, Eduardo Alvarenga <[hidden email]> wrote:

> Hi there,
>
> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known
>
> 127.0.0.1-2007-11-26-18:31 is a directory
>
> It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
> directory.
> Can anyone help?
>
> This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4
>
>
> Regards,
>
> --
> Eduardo Alvarenga
>
>



--
Ticketmaster and Ticketweb suck, but everyone knows that:
http://ticketmastersucks.org
http://lodesertprotosites.org
Dethink to survive - Mclusky

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn?t recognizes 127.0.0.1* as filename

Paul de Weerd
In reply to this post by Eduardo Alvarenga
On Mon, Nov 26, 2007 at 07:24:09PM -0200, Eduardo Alvarenga wrote:
| Hi there,
|
| root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
| ssh: 127.0.0.1-2007-11-26-18: Name or service not known
|
| 127.0.0.1-2007-11-26-18:31 is a directory
|
| It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
| directory.
| Can anyone help?

It's the colon (':') in the filename. Try using double quotes ('"')
around the name and replcing the ':' with a '?'.

| This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4

Shouldn't you ask this question on a RHEL mailinglist ?

Cheers,

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn?t recognizes 127.0.0.1* as filename

Martin Dommermuth
In reply to this post by Eduardo Alvarenga
Hi,

* Eduardo Alvarenga wrote/schrieb:

> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known
>
I think the problem is the ":" in the filename. For me it works with
scp -r ./127.0.0.1-2007-11-26-18:31 $TARGET

MartinD:

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

xSAPPYx
In reply to this post by Eduardo Alvarenga
Giving a path should work (it did on my
/tmp/127.0.0.1-2007-11-26-18:31/ dir I just tested with, and it failed
the same way yours did without the ./ )
scp -r ./127.0.0.1-2007-11-26-18:31 root@server:/u02/snap


On Nov 26, 2007 1:24 PM, Eduardo Alvarenga <[hidden email]> wrote:

> Hi there,
>
> root@cruz crash]# scp -r 127.0.0.1-2007-11-26-18:31 root@server:/u02/snap
> ssh: 127.0.0.1-2007-11-26-18: Name or service not known
>
> 127.0.0.1-2007-11-26-18:31 is a directory
>
> It seems that scp is not understanding that 127.0.0.1-2007-11-26-18:31 is a
> directory.
> Can anyone help?
>
> This is an OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 running on RHEL 4.4
>
>
> Regards,
>
> --
> Eduardo Alvarenga

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Matthias Kilian
In reply to this post by Chris Tankersley
On Mon, Nov 26, 2007 at 04:43:35PM -0500, Chris Tankersley wrote:
> so it's looking to SCP a directory called '31' on the server
> '127.0.0.1-2007-11-26-18' to the other server. If you put the filename
> in quotes, does it work?

Quotes are interpreted by the shell, so this won't help.

Just prefix the file name with ./ to let scp interpret the whole
thing as a simple file name.

Reply | Threaded
Open this post in threaded view
|

Re: scp doesn´t recognizes 127.0.0.1* as filename

Philip Guenther-2
In reply to this post by Chris Tankersley
On Nov 26, 2007 2:43 PM, Chris Tankersley
<[hidden email]> wrote:
...
> That's because your directory name follows the same command pattern that
> scp looks for:
>
> <server>:<directory>
>
> so it's looking to SCP a directory called '31' on the server
> '127.0.0.1-2007-11-26-18' to the other server.

Right.

> If you put the filename in quotes, does it work?

No, because the quotes will only be seen by the shell and not by scp.
If you did manage to get the quotes to scp (by escaping them at the
shell level) it would just think them part of the hostname and
filename.  (How else would you copy a file whose name contained a
quote?)


Philip Guenther