LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 01:52 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
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, 02:50 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

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

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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, 03:24 AM   #4
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

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

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

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 04:26 AM   #6
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
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, 05:31 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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, 08: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, 04:39 AM   #9
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
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



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 12:22 AM
Unknown service using port 807 TheOracle Linux - Security 4 12-27-2006 04:16 AM
unknown service?? pingvina Linux - Security 10 01-13-2006 10:11 AM
unknown service controling open port rysio Linux - Security 2 09-13-2005 12:48 PM
inetd unknown service golien Linux - General 4 08-09-2005 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:43 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
Open Source Consulting | Domain Registration