Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to a server using ssh 1

Status
Not open for further replies.

csunix

Programmer
Mar 23, 2004
129
0
0
GB
Anybody connected to a Solaris server using ssh? We're trying to connect to a server using this method and getting the following error message.

$ ssh -l root 112.1.25.228 port 22: Connection refused

We have couple of identical servers and we can connect to them no problem.

Any help would be appreciated.

CS
 
Not sure about ssh, but check that /etc/default/login has the CONSOLE=/dev/console line commented out if you want to connect remotely as root. Not good security practice though.
 
The CONSOLE=/dev/console is not commented out. However, on the other server it's not commented out either!!!
 
The "Connection refused" message is typically displayed if you don't have sshd running on the remote server.

Check to see if it is responding.
telnet server_name 22

This is strange, but easy way to check. You should see something like:
Code:
Trying 10.1.1.1...
Connected to server_name.
Escape character is '^]'.
SSH-1.99-OpenSSH_3.7.1p2
[b]<Hit Enter>[/b]
Protocol mismatch.
Connection closed by foreign host.
 
When I type telnet servername 22 the screen flashes up and then disappears. I don't get chance to do anything else.
 
Hey, I think KenCunningham gave you the clue. if CONSOLE=/dev/console is not commented, then you cannot remotely login to the server as ROOT. Login as reg. user and use "su -" cmd to switch to root user.
 
Ken is right. I use ssh but we do not allow root to connect. We use our own login account and then sudo to root. Check the ssh website for configuring ssh to allow root to login. It is disabled by default. I'm at home now and don't have access to ssh. There are a few other considerations.
1. What type of authentication do you have? If you are using NIS+ for example, root won't be in there.

2. When I login I do: ssh joeblow@112.1.25.228 We just use the standard default settings fo ssh.

3. Check the .ssh home directory of the user. In your case, root. There are config files in there. Compare them to your other systems.

Good luck,
gallows
 
SSH doesn't reference the CONSOLE setting in the /etc/default/login file. It uses the /etc/ssh/sshd_config (or possibly the /usr/local/etc/sshd_config) file for this type of access.

csunix,

Sounds like you tried my command from a windows system. Try it from a UNIX system. I am guessing from your output though, that it isn't running.

On the server in question, check to see if sshd is running:
ps -ef | grep sshd

If it isn't, try starting it with:
/etc/init.d/sshd start

Note: sshd doesn't come will all versions of solaris by default. What version are you running? I think 8 and below don't have it. If that is the case, you can get it by going to
 
Now sorted thanks to all who replied. ssh wasn't running on the server for some reason. I ran Spamly's command /etc/init.d/sshd start and it has started the process running.
Cheers, CS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top