I have two computers connected by an Ethernet cable. One is a Windows 8.1 devbox, and the other is a CentOS 7 development server with only a terminal interface (No GUI). The development server will at first only interface with the devbox.
How can I set up Windows 8.1 to enable PuTTY SSH connections to the CentOS 7 server through the Ethernet cable?
Here is a screen shot of the Network Connections dialog box in Windows 8.1 showing that it sees the Ethernet connection, but is calling it unidentified by default:
I need to learn the IP of the CentOS 7 server box and also set up home networking to make the connection happen. However what specific steps do I take to set this up?
Best Answer
As there is no routing device between the two, you need to assign an IP address for each of them, additionally being both in the same subnet. So, for example, you can assign the IP address (assuming these are not used, otherwise, you need to choose a different LAN segment):
192.168.100.1
and255.255.255.0
to the Windows box.192.168.100.2
and255.255.255.0
to the Linux box.For the windows machine:
Properties
.Internet Protocol Version 4 (IPv4)
Use the following IP address
192.168.100.1
(or a different one if this is already been used)255.255.255.0
For the linux machine:
You need to find out which interface matches your physical interface. To do that, you can access the
/etc/sysconfig/network-scripts
directory and runls ifcfg-*
. You'll get one file for each network address card you have. To edit the settings of the one that is connected, assuming it's calledifcfg-eth0
, you would runvi ifcfg-eth0
(vi
is the editor, you can usenano
orpico
or whatever you feel comfortable with), and put a content like this:Then you just need to run:
There's no need for a gateway since as said there's no routing (and is not needed).
Now, on the linux box, you need to make sure that the
sshd
daemon is listening to that interface too. You can check that running:And see what is the local address for SSH. It should be something like
0.0.0.0:22
. That would mean it listens to all interfaces, which is what you need. If not, you'll need to edit your/etc/ssh/sshd_config
file and make it listen for this P2P interface as well.