LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-03-2007, 08:29 AM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Rep: Reputation: 30
Networking question - Connecting 2 Linux boxes.


I'm trying to connect two Linux boxes :

Machine 1 : Red Hat 9.0
Machine 2 : Red Hat 8.0

Both have network cards and they are connected by a crossover patch cable.

I've issued the following commands:

Code:
Machine 1 : ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up

Machine 2 : ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up
Fine no problems there as I can ping from either machine. I've tried using telnet/ssh from both machines and cannot connect to the other ( connection timed out). Do I have to modify certain conf files to use these services ?
There are no firewalls /iptables etc running on either machine. I've checked the xinetd file and the services have not been stopped.
I basically want to telnet / rlogin / ssh / sftp from either machine and work on the other - maybe setup ftp at some point.
The machines are not and will not be connected to the Internet.

Thanks
Uncle.

ps: I assumed this was a "newbie" question. Apologies if it should have been posted on the "Networking" forum.

Last edited by uncle-c; 03-03-2007 at 08:35 AM.
 
Old 03-03-2007, 09:00 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
You can ping, so your network is OK, a good start.
Next, make sure you have ssh installed and running on both machines:
ps -A | grep ssh should show the sshd running, if not you'll have to start it.

Edit Oh, and don't try ssh-ing as root - this is usually disabled/forbidden.

Last edited by tredegar; 03-03-2007 at 09:02 AM.
 
Old 03-03-2007, 09:02 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
that primary suggests that there is either a firewall running as you seem to have covered already, or there is no service running to connect to.

note xinetd is only going to affect rlogin and telnet, not worthwhile services like ssh. id' suggest solely worrying about ssh to start with. can you ssh to either box on the box itself? try using both the 192.168 ip and also 127.0.0.1 for the loopback interface.
 
Old 03-03-2007, 10:30 AM   #4
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
SSH service was running on both machines. I think the ssh connection may not have worked as I was running as root. When switching to a regular user the connection and login was successful. I ran the ipconfig lo 127.0.0.1 on both machines for good measure. Not sure if that made any difference. There is one problem still bugging me and that is about "telnet." When on either machine I still cannot telnet to 127.0.0.1 or 192.168.ip - keeping getting the error message "cannot connect to server." I assume this is because the telnet daemon may not be running ? SSH has made telnet redundant in my case but it would be intruging to know why the latter is not working.

Last edited by uncle-c; 03-03-2007 at 10:31 AM.
 
Old 03-03-2007, 10:46 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
I still cannot telnet to 127.0.0.1 or 192.168.ip - keeping getting the error message "cannot connect to server."
If it's any consolation, I get the same, and I have xinetd running (not certain what it does though!).
But I'm not worried as ssh really is the way to go!
 
Old 03-03-2007, 11:49 AM   #6
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
I don't want to start a separate thread but I should be able to remotely display X from one machine to the other using the current configuration ?

Thanks for all the help btw !

Uncle

Last edited by uncle-c; 03-03-2007 at 11:52 AM.
 
Old 03-03-2007, 12:05 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
I should be able to remotely display X from one machine to the other using the current configuration ?
You bet! ssh is way too much fun! Try
ssh -X remotehost
kwrite


kwrite will open and run on the remotehost, but display on yours.

You might also like to look at vncserver and vncviewer which will let you use a remote desktop.
 
Old 03-03-2007, 12:46 PM   #8
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
Excellent !! I'll give partying a miss tonight and get into some hardcore ssh manuals !!! This was one of the reasons why I wanted to link two linux boxes together. Gives you the ideal opportunity to experiment without getting into trouble with the Sys Admins at work

Cheers,
Uncle
 
Old 03-03-2007, 01:14 PM   #9
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
This was one of the reasons why I wanted to link two linux boxes together.
I feel sorry for you, as this is how I started ("I wonder if I can get these 2 boxes to talk to one another somehow...?").

Key: "->" = "leads to"

Crossover cable -> Internet Router / Switch -> Firewalls -> More computers -> More distributions -> Remote desktops (so I can play with them all!) -> Networked printers -> Wireless (locked-down & encrypted of course) -> I probably need Psychotherapy.

So, don't say I didn't warn you.

Have fun!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Connecting Windows boxes via Linux server Sastian Linux - Networking 4 12-19-2004 06:03 AM
Connecting two linux boxes via cross cable ElPuello Linux - Networking 4 11-10-2004 11:55 AM
Networking 2 linux boxes together d4harvey Linux - Networking 6 05-29-2004 12:41 PM
Networking 2 Linux boxes Jester21 Linux - Networking 4 01-21-2003 04:28 AM
Connecting 2 linux boxes with out a hub. sarin Linux - Networking 2 07-16-2002 01:25 PM


All times are GMT -5. The time now is 08:13 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration