- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cannot scp files to another server
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 07:22 PM
тАО07-27-2009 07:22 PM
Cannot scp files to another server
I want to scp some files to another server
ssh: Could not resolve hostname audfile2_2006Sep30_12: no address associated with name
I am able to ping to the other server but I encounter the error above while scp the files.The hosts file looks ok.
Source directory : HP-UX server
Target directory : Linux server
Please advice.
Regards
Feng Lin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 07:54 PM
тАО07-27-2009 07:54 PM
Re: Cannot scp files to another server
Great, but I can't see it, and I don't trust
you. I also can't see your "scp" command.
> ssh: Could not resolve hostname
> audfile2_2006Sep30_12: no address
> associated with name
"scp" seems to think that that's a host name.
If you thought that that was a file name,
then I'd guess that your "scp" command is
defective. Perhaps if my psychic powers
were stronger, then I might not need to
guess. Or, if you showed what you actually
did, ...
"scp -h"? "man scp"?
> Source directory : HP-UX server
> Target directory : Linux server
Not very complete descriptions of these
systems, or their software, either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 08:10 PM
тАО07-27-2009 08:10 PM
Re: Cannot scp files to another server
nslookup is fine?? try with IP....
#scp file username@IP:/path_to_put
this should ask for passwd....
if any error try doing normal ssh is thats working.
BR
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 08:10 PM
тАО07-27-2009 08:10 PM
Re: Cannot scp files to another server
Your check points:
1]Make sure that you should ve host entry both server in /etc/hosts.
2]Please check ssh is working properly.
3]check traceroute between source and destination ,as well as telnet with 22 port is working properly.
Rgds
++
YMP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 09:36 PM
тАО07-27-2009 09:36 PM
Re: Cannot scp files to another server
It's because the files that I want to transfer contain semi-colons. The filenames are for e.g filename_date_12_00:00.txt
That's why it complained about the hostnames.
Any idea how to replace the semi-colon by an underscore for selected files in that directory?
Thanks a lot.
Feng Lin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 10:12 PM
тАО07-27-2009 10:12 PM
Re: Cannot scp files to another server
> transfer contain semi-colons.
Why didn't I guess that?
> The filenames are for e.g
> filename_date_12_00:00.txt
I don't see a semi-colon anywhere in that
name.
Normally, one can quote (using apostrophes or
quotation marks) or escape (using
backslashes) any shell-special characters in
a file name. I might be able to show you
how to do this in your command, but I'm still
not psychic, and you still haven't shown your
command.
> [...] I also can't see your "scp" command.
Did you not read this? Did you think I was
joking? Are you trying to waste everyone's
time? Is there something secret about your
"scp" command, and you're afraid of the CIA?
> Any idea how to replace the semi-colon by
> an underscore for selected files in that
> directory?
bash$ echo 'a;b;c' | sed -e 's/;/_/g'
a_b_c
But I don't really know what you're trying to
do, so I don't know how you might use this
method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 10:14 PM
тАО07-27-2009 10:14 PM
Re: Cannot scp files to another server
Still u have not given the command u r using.
Also if u have embedded special chars. in file name just put the file name in single quotes.
eg. '
eg. 'adfd###????!!!!;;;;::::>>>'
Pl. give the syntax u are using. So that we can help u.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 11:31 PM
тАО07-27-2009 11:31 PM
Re: Cannot scp files to another server
ok, Let's say I have a lot of files with naming convention, filename_2006Mar27_12:00.gz in a specific directory. I want to change all the files in that directory from filename_2006Mar27_12:00.gz to filename_2006Mar27_12_00.gz (That is an example)
Regarding the scp issue, its been resolved because once I replace the : with _ , I will be able to scp to the linux server. I tested and it worked.
Thanks
Feng Lin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 03:13 AM
тАО07-28-2009 03:13 AM
Re: Cannot scp files to another server
> naming convention,
> filename_2006Mar27_12:00.gz in a specific
> directory. I want to change all the files
> in that directory from
> filename_2006Mar27_12:00.gz to
> filename_2006Mar27_12_00.gz (That is an
> example)
You may think that that's clear, but it's
not. For example:
Do you want to rename all the files in that
directory with ":" in the name?
Do you want to rename all the files in that
directory with "_2006Mar27_" and ":" in the
name?
I'd probably write a short shell script which
uses "sed" to transform a file name (as shown
above), and then uses "mv" to rename the
file. Then I might use "find -exec" to run
that shell script against the file names
which "find" finds. This assumes that I knew
which file names to ask "find" to find, which
I don't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 05:14 AM
тАО07-28-2009 05:14 AM
Re: Cannot scp files to another server
for file in `ls -1 filename_*`
do
newname=`echo ${file} | sed -e "1,1s/:/_/"`
mv ${file} ${newname}
done
this will rename all files suiting the naming convention you gave. If they have more than one colon ":" in the name, only the first one will be replaced by and underscore"_". If you have more than one colon and replace all of them, then modify the sed directive between double quotes as follows:
"1,1s/:/_/g"
note the "g" at the end
Hope this helps
Also, please take some time to rate the answers you have received in the past. Here are the questions you asked and received answers without assigning any points:
https://forums11.itrc.hp.com/service/forums/publicProfile.do?userId=WW74647&forumId=1
Your point assignment ratio, sits at an abysmal 22% level
UNIX because I majored in cryptology...