Good description of the command here:
Quote:
scp sourcedir/sourcefile username@host:/path/to/target
|
I used that as a model and this is a cut and paste of it
with result:
Quote:
>scp /c/ins/ejc.ins joe@queen:/c/ins
ssh: Could not resolve hostname queen: Name or service not known
lost connection
|
I was on computer "KING" and put the command in to get
the file sent to computer "queen".
As you can see, KING can't figure out who queen is.
This is where I am apparently missing something in setting up
KING configuration.
==================================
Quote:
The "20 years of experience with linux" is a bit difficult to
swallow, since you'd have to have been using it from the very
first release to get that. I'm also not sure how you've managed
to avoid learning much about TCP/IP in the last 10 years or so.
Not to mention why it never crossed your mind to look at the scp
man page via the
Code:
man scp
|
I have been using linux from the first distributions, almost, which
came on floppy discs. The very first time I used a CD drive I
had to modify code for the CD drives, and compile the kernel to
get my CD drive to work. This was before CD drives were standardized,
and each one then used its own protocall.
Also it did cross my mind to use man scp, but when you do the
resulting verbage can be read with more than one meaning, like:
Quote:
NAME
scp -- secure copy (remote file copy program)
SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for
data
transfer, and uses the same authentication and provides the same
security
|
See the problem here. host1, host2, etc is not defined. Is this
IP address, host name. Also, which is the source and which is the
destination? About as clear as mud isn't it. What does it mean
when it says it "copies files between hosts on a network"? What is
a host? All the people I know call their computers "computers",
not hosts. Since they say hosts, then I am searching again.
Here is what happens when I try to define "host".
gives this man page:
Quote:
HOST(1) BIND9
HOST(1)
NAME
host - DNS lookup utility
SYNOPSIS
host [-aCdlnrsTwv] [-c class] [-N ndots] [-R number] [-t type]
[-W wait] [-m flag] [-4] [-6] {name} [server]
DESCRIPTION
host is a simple utility for performing DNS lookups. It is nor
mally
used to convert names to IP addresses and vice versa. When no
arguments
or options are given, host prints a short summary of its ..
...
...etc.
|
Real big help isn't it?
And going even further with this cryptic write up in man of
how scp works, You would think they would have at least had
brains enough to specify which was the source computer and
which was the destination of the copy like given in the first
tip on this thread:
Quote:
scp sourcedir/sourcefile username@host:/path/to/target
|
But no, this is left to guess work, so you don't know if
you are giving the command to:
copy A TO B or copy A from B. so when the command
does not work, you don't know if it did not work because
you have the path names wrong or some other problem.
Quote:
You can use IP addresses or define them in /etc/hosts.
|
Maybe you can, but I have no clue how to put the IP
address in that command line with scp. Also I have
the problem of "What are my computer IP addresses?"
Also just how do I put them in /etc/hosts?
When I run netstat -nr I get
Quote:
>netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
|
Does any of this tell me my IP address? Is my IP
address something I was supposed to be born knowing?
When I run ifconfig as root, I get:
Quote:
>ifconfig
eth1 Link encap:Ethernet HWaddr 00:50:ba:08:d2:93
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:baff:fe08:d293/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54888 errors:0 dropped:0 overruns:0 frame:0
TX packets:12005 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22719374 (21.6 MiB) TX bytes:2609920 (2.4 MiB)
Interrupt:21 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
|
I suppose something here might tell me my "IP address",
but it is not readily apparent to me what that something is.
Also the file /etc/hosts contains this:
Quote:
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# # By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#
# For loopbacking.
127.0.0.1 localhost
127.0.0.1 KING.King.net KING
# End of hosts.
|
Okay, you say "You can use IP addresses or define them in /etc/hosts"
Great. Problem is I can't figure out how to do this just looking at
the above contents of hosts. So I use man to help me and I get this
help in how to set up hosts.
Quote:
DESCRIPTION
This manual page describes the format of the /etc/hosts file. This
file is a simple text file that associates IP addresses with hostnames,
one line per IP address. For each host a single line should be present
with the following information:
IP_address canonical_hostname [aliases...]
Fields of the entry are separated by any number of blanks and/or tab
characters. Text from a "#" character until the end of the line is a
comment, and is ignored. Host names may contain only alphanumeric
characters, minus signs ("-"), and periods ("."). They must begin with
an alphabetic character and end with an alphanumeric character.
Optional aliases provide for name changes, alternate spellings, shorter
hostnames, or generic hostnames (for example, localhost).
|
Maybe you can figure out how to put an entry in the file "hosts"
from this, but it all somehow escapes me.
Quote:
I'm also not sure how you've managed to avoid learning much about TCP/IP in the
|
That is easy to explain. I have not did much at all with setting up
networks in all my computing. The most I have done is to set up
a computer to get on the internet. I only do this at intervals of
several years in between when I change computers, or internet hardware.
So I am pretty much right where I was to start with, except that
I now know which is the source and which is the destination
with the copy command, thanks to the willysr's first response to
this thread, but no thanks whatever to the man page.
I still have the problem of not being able to do the copy
because, as I said initially:
Quote:
(2) Also none of them tells what has to be set up in
configuration files for things to work. For example
one of my computers is named KING, and one is named
QUEEN. There is probably something on computer KING
that tells what QUEEN is. I don't know what this
configuration file is, so of course I can't put in
the entries that would do the job.
|
I am thinking that if I could come up with what my computer's
IP addresses were, and for sure what "host" is, that maybe
I could make an entry in /etc/hosts that might define
things. I suspect some environmental variable could tell
me what host is, and sure enough entering:
$HOSTNAME
I get the message: KING.King.net
But still what is my host? Is it KING? Is it KING.King.net?
Is host the same as host name? It seems to me upon setup of
Slackware linux when doing the network it asks me for a host
name, at which time I gave it a name like Ace, King, Queen,
yet hostname environment variables have some other stuff
added on here. In the end, I have no clue which is what, and
man sure does not tell me which is which. Maybe they both
work, but do I really want to set it up using trial and error
just trying things until I magically by accident find the
combination?
I am always left with questions, not answers.
Does anyone yet really understand my problem? If you understand
that I want to know:
(1) how to get my IP address for my computor?
(2) What is a host?
(3) what is a host name?
Then you understand my problem. Can you tell me how to run
any of these down?
onebuck, that long list of things you sent me covered everything
from soup to nuts on linux. I have already been through soup to
nuts. Actually I have even in the past copied from one of my
computers to another. I just can't do it now. I don't want
to start over reading everything in the world on linux. I just
want to copy some files from one computer to another that is
on the same network. I don't need an education in linux in
general. One more thing, so linux came out 18 years ago, big
deal, when I said 20 years experience I pulled a figure off
the top of my head that I thought seemed pretty close. 18 to
20 is close. 17 to 20 is close. I am 73 years old and I am
not wanting to try and pinpoint an exact date for something.
For my purposes when I said 20 years, I think I came damn
close for pulling off the figure, even if it was off two years
that is only 10 percent. Quit nitpicking, and think about my
problem, if you want to help. My problem has now expanded to
defending a statement about how long I have used linux, and
this is getting me no where. If you don't want to bother, that
is acceptable, but I am getting damn tired of people nitpicking
on dates.