Don't know the first thing about a local network - Page 2


Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28

Thread: Don't know the first thing about a local network

  1. #16
    Join Date
    Sep 2005
    Posts
    681
    note that 192.168.0.0 is the network address so you could use ip 192.168.1.1 for the rotuer and 192.168.1.2 for the first computers then .3 for the second computer.
    "Software is like sex: it's better when its free."
    -LINUS TORVALDS

  2. #17
    Join Date
    Aug 2002
    Location
    Western NY
    Posts
    1,116
    Your 2 computers will be on the same subnet because they are getting IPs from your router via DHCP.

    Most distros will have sshd running by default. Here are some example of how you can copy files from one to the other using that protocol.

    Host A - 192.168.0.50

    Host B - 192.168.0.167


    You are logged into Host A, and want to grab the a file from host B called backupdata

    Code:
    $ scp 192.168.0.167:/home/user/scptestB/backupdata .
    Password:
    backupdata                                    100%    0     0.0KB/s   00:00
    And the file is copied.


    The period at the end of the command will copy the file to whatever directory you are currently in. If you don't want to copy the files to the current working directory just specify the location.

    Code:
    scp 192.168.0.167:/home/user/scptestB/backupdata /usr/local/data/backupdir
    If need to specify a certain user you can use the command like this

    scp username@192.168.0.50:/path/to/files /some/location

    Another option is to use sftp, also part of the ssh.

    sftp user@host

    then put in the password.

    At this point you can "cd" to different directories "ls" to list files, and once you find what you want type "get" then the filename, and it will copy it over..

    That should get you started.
    Join #justlinux on irc.freenode.net

  3. #18
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    Quote Originally Posted by happybunny
    not sure what the issue is here.

    Do both machines have IP's?

    Are they similar? (192.168.1.1 and 192.168.1.2)

    Then install ssh on both and ssh from one to the other

    or setup nfs (/etc/exportfs file) and nfs mount drives

    or setup samba (not hard) and smbclient mount drives

    or do any of the above and any modern desktop manager has a "Network Neighborhood" feature that will find any machines on the network with any type of sharing going on.
    The issue is I don't know what ssh is, but now at least I know what I need to google. Chances are that's all I'm really going to need.

  4. #19
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    763
    note that 192.168.0.0 is the network address so you could use ip 192.168.1.1 for the rotuer and 192.168.1.2 for the first computers then .3 for the second computer.
    Actually, the network address would most likely be 192.168.1.0, but the rest is correct.

    Im surprised you don't know what ssh is blackbelt. I know you are a fan of the command line and I would've expected you to at some point have to remotely log in from one linux box to another.

    The general explanation of what ssh is, is that its a safe alternative to telnet. Of course it can provide more features than that but thats the most common use for it.
    Check out the Unix/Linux Administration Program at Seneca College.
    Thanx to everyone that helped/helps me on this forum!

    t0mmyw on #linuxn00b

  5. #20
    Join Date
    Jan 2003
    Posts
    21
    Lots of good info in the Rute tutorial Chapter 25 "Introduction to IP" helped me set up my home
    network in Windows and Linux (http://rute.2038bug.com/node28.html.gz) Chapter 25.4 "Computers on a LAN"
    I was born in a crossfire hurricane...
    Linux User #343734

  6. #21
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    Quote Originally Posted by Calipso
    I'm surprised you don't know what ssh is blackbelt. I know you are a fan of the command line and I would've expected you to at some point have to remotely log in from one linux box to another.

    The general explanation of what ssh is, is that its a safe alternative to telnet. Of course it can provide more features than that but thats the most common use for it.
    I don't know what telnet is, either. Did you think I was kidding when I named this thread? It's not that I've never seen these words before, but I've never needed to understand them to do what I've been doing these past few years. I've been strictly a home user with one computer on the internet at a time. I've always had an older box sitting around, which I would use when the better computer was on the fritz, but I've never had a practical reason to be running more than one computer at once, and now I do. I'm keeping my older computer, which has no working soundcard or 3D visuals , next to my sofabed for reading and writing. No doubt about it, I get more work done on a computer without the multimedia applications to distract me.

    So it now seems natural that I'm going to want to share data occasionally between the two computers, even if it's only a custom fluxbox theme, and that makes this the perfect opportunity to address this vast blind spot in my knowledge.
    Last edited by blackbelt_jones; 01-21-2007 at 11:59 AM.

  7. #22
    Join Date
    Jan 2003
    Location
    Zurich, Switzerland
    Posts
    2,657
    Quote Originally Posted by blackbelt_jones
    I don't know what telnet is, either.
    Telnet and SSH (Secure Shell) both have the same idea, namely to control a remote computer by some shell-like thingy. However, Telnet is considered insecure and SSH is (in my eyes) more similar to bash, so there's basically no reason to run Telnet. Well, maybe one: all computers with Microsoft Windows have a Telnet client installed by default. However, we have never been running anything just because it comes with Windows, have we?

    "What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."

    Tractatus Logico-Philosophicus by Ludwig Wittgenstein (1889-1951)

  8. #23
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    If you have a router, you can use it to autoconfigure devices over DHCP (Dynamic Host Configuration Protocol) that dishes out IP addresses to the network it is attached to. This allows for seamless addition and removal of computers without needing to configure each one. Whilst it is immensely more useful to a massive corporate network, I always configure it. The only ***** with it is that it gives people headaches with DNS.

    Anyway, if you don't want to use a router, you can simply connect two machines together with network interface cards (NICs) and use a crossover RJ45 cable (must be crossover if you do not use a hub, switch or router. You can easily tell the difference between a straight-through and crossover by looking at the plugs - a straight-through cable has identical coloured wiring in both ends, a crossover doesn't). You could also use (older) BNC networking easily enough, and you do not need a router, hub or switch, and you can have massive cable runs (much more than RJ45) but the speed is lower (maximum of 10Mbps with thin-net, 5Mbps with thicknet). You also need T-Pieces for connection to the card and terminators at the end.

    Anyway, assuming you have managed to connect everything together, you also need the relevant kernel modules which typically needs a kernel recompile. A quick shortcut is to do your usual "make menuconfig" in the top-level directory of the kernel source and select the correct driver as a module and then just do a "make modules" to build the driver. Copy it to /lib/modules/<kernel-version>/net/ or wherever it needs to be and run depmod. Once the module is loaded, you should be able to run "ifconfig" and get a new device: eth0

    There's a LOT to IP addressing, subnetting and setting up of a network, so I won't go into too much detail here.

    To use static IP addressing (i.e. each machines ALWAYS has the same IP and DHCP is not used) you need to set up the interface with ifconfig.

    ifconfig eth0 192.168.0.1

    is sufficient to configure one card, but you must NEVER have two machines with the same IP address. EVER. That rightmost digit in the dotted-quad notation is machine number and to retain the same subnet, keep the other numbers the same and just change the last one to retain the subnet. Subnetting is something I've never really gotten into (especially splitting a subnet into two separate subnets) but the following subnet masks are for each network:

    Class A (Private): 10.x.y.z subnet 255.0.0.0
    Class B (Private): 172.x.y.z subnet 255.255.0.0 (x in here can be 16-31)
    Class C (Private): 192.168.x.y subnet 255.255.255.0

    http://en.wikipedia.org/wiki/Subnetting has more information on subnetting.

    Anyway, getting back to the topic. Once both machines have an entry viewed under ifconfig, and have IP addresses assigned, you should be able to ping eachother. Ping sends an ICMP_ECHOREQUEST packet to the host. Once received, provided the firewall allows it, it responds with an ICMP_ECHOREPLY. Use of ping also shows the network latency (delay) by timing the packets from it being sent to the reply coming back. Ping, however, is normally used to test resolving and to prove that a machine is responding on the network.

    Contrary to what XiaoKJ says above, I used the TLDP to learn a hell of a lot about networking. I currently run my own DHCP server to remote configure machines temporarily and I resolve my own internet domain names with DNS. Although not essential for a small network it did help me to learn about it and since I now internetwork with friends using OpenVPN, I have a large network to play with and I can simply reference a machine by name rather than use a convoluted /etc/hosts file or know a machine's IP address.

    If you want to try DHCP or DNS, I can certainly post example configuration files or help you debug yours.

    As a quick side-note, a few years ago when I was on Blueyonder, they took down their domain name servers for maintenance leaving their customers to resolve domain names themselves. Although no-one else could resolve domain names (and hence had VERY limited access to the Internet), I could still resolve all the names myself, ensuring that I maintained connectivity.

    Finally, the services that you may wish to run:

    Samba - the Server Message Block protocol (now known as CIFS, Common Internet FileSystem) is the way that Windows transfers files across networks. It also has provision to act as a Windows Domain Controller. It can be awkward to configure, and relies on old-fashioned (and useless) Workgroup/Domain specification which must match on all machines. It is massive, but very powerful and flexible and also works extremely well. If you don't use Windows, then you probably don't need it. NFS is far more efficient and easier to configure.

    NFS - The Linux Network FileSystem. Simply put, you edit your /etc/exports file to specify the directories you wish to export and then you can mount them on a remote machine as though they were local. This works beautifully on Linux, and if you only run Linux machines, is by far the best way to go.

    SSH - The Secure SHell - an advancement to the insecure Telnet protocol (although Telnet is perfectly fine on a closed, internal network, the configuration is very similar and therefore SSH is preferred). Running on just one port (22) SSH offers you a console on a remote machine and is perfectly secure enough to set up port forwarding to a specific machine through your router to allow access from anywhere on the Internet (providing you know your own IP address). I use SSH on all my machines but I use certificates to improve security and disable password logins. You cannot logon to a machine unless you have the certificate file. If you don't have it, the error back is "Publickey error". You are not even prompted for a username or password. If you have the certificate, it lets you straight in. This is a great timesaver provided the certificates are kept secure. Note, a friend of mine recently detected a hacking attempt from the US over SSH, but his password was never compromised. Using certificates will prevent this kind of attack altogether.

    Hope this helps someone,

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  9. #24
    Join Date
    Sep 2005
    Posts
    681
    I don't know what ssh is
    ssh stands for secure shell. Its runs as a client/server. You have a sshd server on one computer and use a ssh client on the other computer called to connect to the sshd to do remote acess.

    ssh is secure replacment for telenet which you may have heard of. Telenet does the same thing as ssh but its unsecure meaning the username and password is send in clear text. ssh on the other hand does not send user and password in clear text. it is encrypted and so is the data that is being send from ssh client to server.
    "Software is like sex: it's better when its free."
    -LINUS TORVALDS

  10. #25
    Join Date
    Sep 2005
    Posts
    681
    Telnet and SSH (Secure Shell) both have the same idea, namely to control a remote computer by some shell-like thingy. However, Telnet is considered insecure and SSH is (in my eyes) more similar to bash, so there's basically no reason to run Telnet. Well, maybe one: all computers with Microsoft Windows have a Telnet client installed by default. However, we have never been running anything just because it comes with Windows, have we?
    Telenet = remote login
    Ssh = remote login

    Telenet in the early days was secure enough to use because public networks were small back then. Telent is a very old client/server appz. Once the world wide web was in use and networks became larger it was wise to use due to secuirty such as sending user and password in clear text. Ssh was created to prevent this problem of having user and password in clear text by encrypting TCP/ip packets.

    I hope that explains why ssh is preferred over telenet. to use either of them you download a server deamon that runs and config them . for ssh the deamon is sshd. do a search for your distro to see the naming of the server package. you will also want to install the client package on both computers . You should read the readme file to learn how to use it as well as the man pages. good luck
    __________________
    "Software is like sex: it's better when its free."
    -LINUS TORVALDS

  11. #26
    Join Date
    Jun 2002
    Location
    Michigan
    Posts
    875
    SSH

    To make things simple ( the way I need things to be ) you have 2 computers, computer A (newer pc) and computer B (older pc).

    You are working on computer A but you need to look at a file on computer B. You can standup and walk over to computer B and open a terminal window log in as root and look at the file. Or you can open a terminal window on computer A and log into computer B and do the work you need to do without having to stand up and walk over to computer B. ssh and telnet are the programs that let you do just that.

    The problem is telnet sends all the info so someone can see what you're doing, get usernames and passwd, not good. Ssh encripts the info and makes it secure thus the name secure shell or ssh for short.


    Edit:Here is some good info on ssh and scp.
    Last edited by mrrangerman43; 01-24-2007 at 01:11 PM.

  12. #27
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    763
    Well after 6 posts explaining what ssh is, Im sure you will see it as a very useful tool.
    Check out the Unix/Linux Administration Program at Seneca College.
    Thanx to everyone that helped/helps me on this forum!

    t0mmyw on #linuxn00b

  13. #28
    Join Date
    Dec 2002
    Location
    Right where I am
    Posts
    903
    XiaoKJ just as a note scp uses sftp. sftp is build into the ssh daemon
    -------------------------------------
    blobaugh
    lobaugh.net


    All you ever need to know about Samba at O'Reillys (Online book)
    DSL Linux in your pocket.
    Need help choosing a distro? Distro Chooser
    My Screenies
    Table of Windows equivalent software on Linux
    Linux Games from Windows

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •