Quote:
Originally Posted by bbraml
Location 3 can ping all the servers. Location 3 has a total of 4 RHEL servers. its just one that cannot ssh to the rest. That location 3 server cannot ssh to any server in Location 1. That location 3 server can ssh to 1 out of the 15 servers in location 2. The other RHEL servers in location 3 can ssh to all 30 of those servers
|
Ping only means that "Point A can see Point B." It does not check port access.
Starting with ping is always good. If ping doesn't work, it guarantees ssh will not work(*). On the other hand, if ping works, it does not guarantee that ssh WILL work, it only validates that ssh COULD work.
The next step is to valid that you have connectivity on port 22.
Ex:
MyWorkstation> ping Server3-1
ping: Server3-1 is Alive
Now, you need to ensure the 'MyWorkstation' can access 'Server3-1' via port 22. In the old days, we could use telnet for this:
MyWorkstation> telnet Server3-1 22
Connect ....
Today, telnet is an insecure protocol and may not be installed on your system. Some folks use the telnet option of curl to try this:
MyWorkstation> curl
telnet://Server3-1:22
If you get this message:
Failed to connect to Server3-1:22; Connection Refused
Then you cannot connect on port 22, which is why your SSH fails. Maybe a firewall issue, may be an isue with sshd not running (properly), maybe an issue with sshd_config preventing access, maybe something in /etc/hosts.alloy or /etc/hosts.deny
If you get nothing back, press enter 3 times. You will see messages about the SSH version and end with something like:
curl: (55) Send Failure: Broken Pipe
Then you can get to port 22 and the problem lies elsewhere.
I use bash to try to connect:
MyWorkstation> bash
bash-$] echo </dev/tcp/Server3-1/22
If you get a connection refused error, port 22 is inaccessible on Server3-1
If you get a blank line followed by your prompt, then you can access port 22
If the terminal hangs, you may have a slow connection (so ssh is timing out on connect).
or, in some cases, the connection is hung and you are waiting for the timeout to show that the port is closed. This would also cause an ssh error.
Post your troubleshooting results and we may be able to give you more advice.
Are you using SSH keys? Try and force a password login
(*) Excepotion: some networks disable ping, in which case, the previous statement is useless.