Linux — SSH
The first thing to check when troubleshooting an SSH connection is to ensure that SSH is actually running on your machine. Do this with one of the following three commands:-
/etc/ init.d/sshd status (shows the status of SSH on the server)
ps= aux l grep sshd (which will list all users on SSH for the server)
netstat-n then grep 22 (lists all connections on the server, port 22 being the most common for SSH use)
Look at the configuration file at etc/ssh/sshd_config and check the “listen” address to ensure the default with comments, usually 0.000.0.0 which allows all IP addresses, or if a specific IP address is assigned, ensure that the user is using SSH with that IP.
If the SSH connection still cannot be established, verify from an outside source that the port is open. Do this by entering the command telnet <IPaddress>. The cursor will hang if the port is closed and will blink if the port is open. This will better identify the issue depending on the status of the port.
Use a port scanner to locate all ports on the server to determine what port is being used for SSH and if it is active. Enter the command nmap<host>. If the port number is known, enter the command nmap-p <port> <host>.
Check the /etc/ file and look through the etc hosts.allow and etc hosts.deny files to ensure they accurately represent the user trying to access the server. If the user's IP address is in the etc hosts.deny file, edit the file and remove the IP as he or she could accidentally be blocked from the system.
Once you have completed all of the above troubleshooting points and have yielded no results, SSH daemon on the server should be debugged. Begin by stopping the SSH service on the server with the following command:
-
/etc/inti.d/sshd stop
Then run usr/sbin/ sshd-d
-
ssh-v root@<host>
Windows — Remote Desktop Connection
Many of the same or similar troubleshooting tools can be used in Windows, but via the Windows GUI. This may be an issue with 3rd party firewall software as well, so be sure to check for other firewalls besides the firewall built into Windows 2003 (2000 does not include a software firewall). To begin, always check that the firewall (whether host based or hardware) is not blocking access to the user:- Click on “Start”, “Control Panel”, and then “Windows Firewall”.
- Ensure that if the firewall is on, the “Don't Allow Exceptions” button is unchecked.
- Ensure that “Remote Desktop” is selected under the “Exceptions” tab.
- Also check the “Scope” button in the firewall to ensure that the customer IP is not being blocked. It is possible to change the port running RDC, so check to see if this is the case (standard RDC port is 3389).
- If you are running a 3rd party firewall, you will receive an error message such as “IP nat.sys in use” during log on.
- If the “Routing and Remote Access” box is checked in the firewall, this may also be causing the issue.
- Ensure that the user has the “Enable Remote Desktop Use” box under the “Remote” tab in the “System Properties”.
- Click on “Start”, “Administrative Tools”, and then “Terminal Services Manager”.\
- Determine the mode of the server by opening the “Terminal Services Configuration” tab.
- Select “Server Setting”, then “Licensing”. The default setting should say “Remote Desktop for Administrators”, which allows two remote users and a console users for a total of three users.
If the above tools cannot be accessed due to a downed server, contact ServePath Support for further assistance.
Another method is to install “Terminal Server” by doing the following:
- Click on “Start”, “Control Panel”, then “Add/Remove Programs”.
- Click on “Add Programs” and select “Terminal Server”
- Once this is installed, it changes the server mode to “Terminal Server”, which is most commonly used for application sharing. Using this tool is free for unlimited users for only 120 days. Once the 120 days have expired, a tscal license is necessary for each user. This may be the issue you are experiencing if you use Terminal Servers for remote access. ServePath provides licenses on a fee for service basis if you wish to continue using Terminal Servers.
Check the “Local Security Policy” or the “Domain Security Policy” depending on your server. Open “Local Policies” or the “Domain Policies”, then “User Rights Assignment” then “Allow User Log On Through Terminal Services”. The remote desktop user should be included in the list. If they are not, add them. Ensure that the remote desktop user is not on the “Deny Log On Through Terminal Services” list on the same page. If the remote desktop user is included in the list, remove them.
Ensure that you have checked the “Local Directory” or “Active Directory" (depending on your server type) by doing the following:
- Click on “Users and Computers”
- Double-click on the user in question
- Open the user's properties
- Check the “Terminal Services Profile” tab and ensure that none of the boxes have been checked.