LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Networking question - Connecting 2 Linux boxes. (https://www.linuxquestions.org/questions/linux-newbie-8/networking-question-connecting-2-linux-boxes-534161/)

uncle-c 03-03-2007 07:29 AM

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.

tredegar 03-03-2007 08:00 AM

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.

acid_kewpie 03-03-2007 08:02 AM

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.

uncle-c 03-03-2007 09:30 AM

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.

tredegar 03-03-2007 09:46 AM

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!

uncle-c 03-03-2007 10:49 AM

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

tredegar 03-03-2007 11:05 AM

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.

uncle-c 03-03-2007 11:46 AM

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

tredegar 03-03-2007 12:14 PM

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!


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