LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2007, 11:21 PM   #1
soccercisco
Member
 
Registered: Dec 2006
Location: Fullerton, CA
Distribution: Debian
Posts: 36

Rep: Reputation: 15
Simple/stupid question - LAN setup


So, here is the deal.

I have spent labor day setting up my Linux-based network, and have been stuck for a few hours on this:

I have a Window$ PC from which I would like to transfer data to my Linux box. I plan to do this via SSH (using putty from my Window$ machine).

I have connected both ethernet cards together (Linux Box - To - Windows Box), and I am trying to configure them as a LAN.

So, after searching the Internet I have tried:
# ifconfig eth0 192.168.1.2 netmask 255.255.255.0
# route add default gw 192.168.1.1 eth0

And then setting the Window$ Box to:
IP: 192.168.1.1
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
DNS Server: 192.168.1.1

I know this was probably stupid to do, so if you can spare the time (as I am sure it takes less than 1 min to write a fix for this) I ask for your help in setting this up.

Thanks in advance.

Edit: I forgot to mention, that I do not want to setup DHCP or anything, I just want to transfer files (too big to put in any portable device). Thanks.
 
Old 09-04-2007, 12:22 AM   #2
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
You are using a cross-over cable, aren't you. A regular ethernet cable won't work.

Have you configured the putty server on the Linux box.

Cheers.
 
Old 09-04-2007, 12:29 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You don't need a putty server on Linux. You do need to install openssh. If you don't have a hub or switch, you will need to use a crossover cable.

After using ifconfig to setup an IP address, and route to set up your default route, check the output of /sbin/ifconfig. Also try pinging from one machine to the other. You will also need to open port 22 in your firewall.

Putty also supplies a version of scp and sftp that you can use for file transfers. You could also install samba and set up a share on the windows machine as well.
 
Old 09-04-2007, 01:15 AM   #4
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
My bad. I meant ssh, not putty.

Cheers.
 
Old 09-04-2007, 03:19 AM   #5
soroccoheaven
Member
 
Registered: Jul 2007
Distribution: mandrake Mandriva Redhat CentOS Slackware
Posts: 221

Rep: Reputation: 30
Quote:
Originally Posted by soccercisco View Post
So, here is the deal.

I have spent labor day setting up my Linux-based network, and have been stuck for a few hours on this:

I have a Window$ PC from which I would like to transfer data to my Linux box. I plan to do this via SSH (using putty from my Window$ machine).

I have connected both ethernet cards together (Linux Box - To - Windows Box), and I am trying to configure them as a LAN.

So, after searching the Internet I have tried:
# ifconfig eth0 192.168.1.2 netmask 255.255.255.0
# route add default gw 192.168.1.1 eth0

And then setting the Window$ Box to:
IP: 192.168.1.1
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
DNS Server: 192.168.1.1

I know this was probably stupid to do, so if you can spare the time (as I am sure it takes less than 1 min to write a fix for this) I ask for your help in setting this up.

Thanks in advance.

Edit: I forgot to mention, that I do not want to setup DHCP or anything, I just want to transfer files (too big to put in any portable device). Thanks.
pls provide these info:
Is it a Lan only or for internet access too..?
Cable used to connect win and linux ?
using any switch/hub/router ?
are your win and linux able to see each pther ?


you can configure samba (which is best option ) or even you can use ftp or ssh ..

Last edited by soroccoheaven; 09-04-2007 at 03:22 AM.
 
Old 09-04-2007, 10:04 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
For one shot file copying, scp is great. Especially if you want to pull a file from another host quickly, but the source directory isn't shared. If you need to search for a file, try sftp. Once ssh is setup, scp and sftp are more convenient for ad-hoc copying between machines than setting up a new share.


If you install Cygwin, you don't need the putty client. If you install Cygwin/X, you can run a program on the Linux machine remotely, but have it display graphically in a window on the Windows machine. Using ssh, you can control two separate programs on two different remote machines. Neat!
 
Old 09-04-2007, 10:13 AM   #7
bryantrv
Member
 
Registered: Jan 2005
Location: DeLand, Florida US
Distribution: Debian Etch
Posts: 91

Rep: Reputation: 15
A lazy man's way to do it is to install webmin on the Linux box and log in from the Windows box.
But.. the network needs to be configured correctly first.
 
Old 09-05-2007, 01:49 PM   #8
soccercisco
Member
 
Registered: Dec 2006
Location: Fullerton, CA
Distribution: Debian
Posts: 36

Original Poster
Rep: Reputation: 15
Hi all, thanks for the replies -- Solved

Hi, thank you all.

I literally just wanted to transfer the files; I am familiar with ssh, putty, cygwin... I just didn't understand what was wrong with my configuration.

So, I was using just a regular Ethernet cable from Computer A (Linux) to B (Window$). As it was suggested by earlier posts I assumed that this was the problem. So I just connected a router in between Computer A (Linux) and Computer B (Window$). And I let the router take care of the LAN addressing via DHCP (I didn't do this to begin with, because I didn't think this was necessary for such a simple task).

Thanks to all others for additional suggestions.
 
Old 09-05-2007, 07:15 PM   #9
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
Quote:
Originally Posted by soccercisco View Post
So, I was using just a regular Ethernet cable from Computer A (Linux) to B (Window$). As it was suggested by earlier posts I assumed that this was the problem.
Yep, probably was.

Cheers.
 
  


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
eval suse 10 simple stupid update question towsonu2003 SUSE / openSUSE 5 10-07-2005 03:02 PM
Stupid, stupid question; I lost Klaptop. :( Surfrider Slackware 2 08-31-2005 09:12 PM
Stupid Newbie with simple question... tufkid Linux - Newbie 11 12-25-2004 10:40 PM
Stupid GNOME Question - Probable simple answer. jordo2323 Linux - Newbie 7 11-22-2004 09:54 AM
Simple LAN setup SBarretDolph Linux - Networking 2 01-22-2004 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:37 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