hello,,

I have an FC4 PC and a Laptop running WinXP on my LAN. The IPs on both PCs are statically assigned. I have confirmed ping tests to and fro both PCs to confirm both are on the network. I have Putty Installed and running on my WinXP.

The IP on my FC4 is xxx.xxx.xx.5. The one on my WInXP is of the format xxx.xxx.xx.2. I have observed that i can only connect from Windows to Linux, using Putty if the FC4 has the IP xxx.xxx.xx.5. The first time I installed Putty a week ago, (.5) was the IP I had assigned to my FC4. If I should change the IP on my FC4 to some other valid IP i have, confirm ping tests to and fro, and I try to connect to Linux from Windows, using Putty, I get the error "connection refused". However if I should change my FC4 back to (.5), connection is possible thru putty on Win.

Pls, why is this so? Note: i verify that both PCs are on the network, ping to and fro, etc. If I changed my FC4 IP, definitely I change the IP putty is to connect to, but still I get a connection refused error.

Pls help
Toks

Dani AI

Generated

As describes: ping succeeds both ways and PuTTY connects when the FC4 box is set to .5, but changing the server to another static IP gives "connection refused." That error normally means the Windows host reaches the target IP but no process is accepting TCP connections on port 22 (or the host immediately rejects the TCP attempt). That is different from a timeout, which suggests packets are being dropped by a firewall or routing problem.

Quick diagnostic checks to run on the Fedora (FC4) box:

# check whether sshd is bound to a specific address
grep -i '^ListenAddress' /etc/ssh/sshd_config

# confirm what process (if any) is listening on port 22
sudo netstat -tlnp | grep :22

# verify the interface has the assigned IP
/sbin/ifconfig -a    # or: ip addr show

# view firewall rules that might reference a specific destination IP
sudo iptables -L -n -v

Common causes and fixes:

  • sshd bound to a single IP: if ListenAddress is set to the old .5 then sshd will only accept connections on that address. Comment out or remove those lines so sshd listens on all addresses (or add the new IP), then restart sshd (on FC4: service sshd restart).
  • Firewall rules tied to a single destination: iptables can be written to accept SSH only to a specific destination IP—update /etc/sysconfig/iptables or the active rules to allow the new IP.
  • ARP/IP conflict: another device claiming the new IP can make SSH fail even though ping replies look OK. Use arp -n on Linux or arp -a on Windows to verify the MAC for the IP.

A note on ’s point: clearing PuTTY/known_hosts entries deals with host-key warnings, not "connection refused." That advice helps when PuTTY refuses to connect because of a changed host key, but it will not make a server that isn’t listening on port 22 start accepting connections.

Member Avatar for Member #2466

Putty caches the certificates (SSH certs) in a setting file in the registry in windows. On Linux, it is in the known_hosts file in .ssh directory (most distros). Just do a

find known_hosts

or

locate known_hosts

in Linux. In windows look for SshHostKeys in the following registry entry:

HKEY_CURRENT_USER\Software\SimonTatham\PuTTY

You're set! You can delete sessions there too...delete it and try connecting again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.