LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2011, 02:52 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
ssh : name or service unknown


Hello,

I am connected to a server with openvpn.

When I try to get a file from this server to my workstation, then the error appears :

ssh: 2011-04-28_10: Name or service not known

But in fact the name of the file is :

2011-04-28_10\:26\:45

I guess the system can not handle the time indication in the filename ?

Escaping it with \ does not help apparently.
 
Old 05-13-2011, 03:50 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Did you try using single quotes? Eg something like:
Code:
scp somemachine:'2011-04-28_10:26:45' .
Evo2.
 
Old 05-13-2011, 04:13 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
I cannot reproduce your error, since scp on my system accepts colons in file names flawlessly. Please show us the exact command you've tried. In alternative you can try something like:
Code:
ssh user@host "cat 2011-04-28_10:26:45" > 2011-04-28_10:26:45
 
Old 05-13-2011, 04:24 AM   #4
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Actually, the exact command is :

scp * Jonas@10.10.0.2:/home/Jonas/Desktop
 
Old 05-13-2011, 04:30 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
I would use rsync for this. Eg, something like:
Code:
rsync -auv --dry-run -e ssh ./ Jonas@10.10.0.2:/home/Jonas/Desktop/
If the above appears to do what you want, remove the "--dry-run" flag to do it for real.

Evo2.
 
1 members found this post helpful.
Old 05-13-2011, 05:26 AM   #6
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Hi,

Suppose you have file1 (in directory /tmp) on 192.168.1.3 and you want to copy it on 192.168.1.4 the do this
Run this command from 192.168.1.4
Code:
scp 192.168.1.3:/tmp/file1 .
. specifies current directory

hope this helps
 
0 members found this post helpful.
Old 05-13-2011, 06:31 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by jonaskellens View Post
Actually, the exact command is :

scp * Jonas@10.10.0.2:/home/Jonas/Desktop
In this case the colon in the name of the source file make scp to think it's a host specification. To avoid that, tell scp it's actually a file by adding the path ./ to the file name (or to the wildcard as in your example), e.g.
Code:
scp ./* Jonas@10.10.0.2:/home/Jonas/Desktop
This should do the trick!
 
1 members found this post helpful.
Old 05-13-2011, 09:03 AM   #8
dimpleboy
LQ Newbie
 
Registered: May 2011
Location: quezon city, philippines
Posts: 13

Rep: Reputation: 0
hi, you can try scp -r filename user@hostname:/path where you want to copy file/.

I think linux accepts spaces and columns in filenames, you might want to check as well your sshserver and sshclient if they are installed in your machine.
 
Old 05-14-2011, 05:39 AM   #9
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by colucix View Post
Code:
scp ./* Jonas@10.10.0.2:/home/Jonas/Desktop
This should do the trick!
This indeed makes it all work. Thanks !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unknown service katrok Linux - Security 9 05-22-2009 01:22 AM
Unknown service using port 807 TheOracle Linux - Security 4 12-27-2006 05:16 AM
unknown service?? pingvina Linux - Security 10 01-13-2006 11:11 AM
unknown service controling open port rysio Linux - Security 2 09-13-2005 01:48 PM
inetd unknown service golien Linux - General 4 08-09-2005 11:58 PM


All times are GMT -5. The time now is 01:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration