SCP: No such file or directory...but its there!?
I'm trying to get a friend to scp a file to me, test.txt, we've been using the command (yes...foo'd=my ip address):
scp test.txt brian@foo'd:/home/brian however he keeps getting the error: cp: brian@foo'dhome/brian: No such file or directory Yes...for some reason in the error the :/ between the ip and /home/brian is not there. And I double checked...brian does have an account, password and a /home directory on my computer. |
Does the server actually have an apostrophe ( ' ) in the name, or is that just an example? If it does, that's probably part of the problem. The shell is probably interpreting that as the beginning of a string. Try escaping it:
Code:
scp test.txt brian@foo\\'d:/home/brian |
no sorry, foo'd is just what i changed my ip address to show, and there's no apostrophe in the ip address. I'd rather not have people bashing on my door trying to log in as brian lol
|
Your friend can ssh into the box using the brian account, right?
I mean: Code:
ssh brian@ip_address |
lol we should have tried that in the first place. Yes he can ssh right on in.
|
Well, I don't understand what would be the problem. I'll ask this though:
Quote:
If you can ssh in, then there should be no problem with scp... I'm at a complete loss... |
Actually cp isn't a typo, the error actually comes out like that.
And I made quadrubly sure he was trying scp before preparing to bludgeon him to a bloody pulp. :D |
Even wierder... he just sftp'd in and fetched a file.
|
That's odd, because I went to go try it myself. Here's what I got:
Code:
$ scp test.txt helmet@spaceball1:/home/helmet/no_exist/test.txt Code:
scp: helmet@spaceball1home/helmet/no_exist/test.txt: No such file or directory And for the record, my version of scp: Code:
$ ssh -V |
i noticed you also had to type in a password, he doesn't even get to do that.
Also I tried to do exactly what i told him to do, even used his name and password and it worked: Code:
bash-3.00$ touch test.txt Code:
bash-3.00# ssh -V OpenSSH_3.6.1p1+CAN-2004-0175, SSH protocols 1.5/2.0, OpenSSL 0x0090702f |
At this point, I think it's pretty clear there's something fubar'ed with his client. I don't know if he's using a linux box with a strange/old version of the ssh suite, or if he's using a windows client that needs some reconfiguring, but there's something wrong on his side.
I'll look the other way if you want to start bludgeoning at this point. EDIT: That could be the problem. Mac ports (I have heard) are not always 100% faithful reproductions of their original unix counterparts. I would check the man page for his scp documentation. He may need to break up his command. For instance, he may need to do something like: Code:
scp -u brian -ra foo'd test.txt /home/brian Unfortunately, I don't have any first-hand experience with a Mac, and can't give anything more than that... |
Looks like you caught it before me, just edited my last post when he reminded me about that. And not to be redundent but his ssh -V is:
Code:
OpenSSH_3.6.1p1+CAN-2004-0175, SSH protocols 1.5/2.0, OpenSSL 0x0090702f EDIT: Oh just saw your other edit about the mac ports, we'll try that and check his man pages. |
Yeah, if he can ssh, then his version should be capable of handling the protocols to copy the file. Even doubly so if he can sftp (because an scp should be a trivial ftp connection). My guess is the command line syntax. I figure there's got to be something unique/different in the way he would have to specify the user name, server, and that sort of thing.
|
I'm getting a headache look at this mess lol:
Here's he's usage for scd: Code:
usage: scp [-pqrvBC1246] [-F config] [-S program] [-P port] Code:
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] |
Well, it looks pretty much the same... I was mainly suspicious of the user@host parts.
In that case, the problem might be with bash and how it interprets the command line. He could try quoting the destination file in an attempt to preserve it. Something like: Code:
scp test.txt 'brian@ip_address:/home/brian' |
All times are GMT -5. The time now is 02:31 PM. |