Ssh Connection refused port 22

Hello everybody,

I'm a begginer using Solaris so I really need your help. I'm trying to copy a file using scp from a Red Hat Linux 6 server to an Oracle Solaris 11 machine and all i get is an error "" ssh: connection to host <HOST_IP> port 22: Connection refused lost connection.

Thanks for the help

No amount of opening ports will allow you to connect if sshd isn't actually running on the sun system.

On Solaris machine check if sshd is running:

svcs -p /network/ssh

If it is disabled then you must enable it

svcadm enable /network/ssh

If you still have problem, then check /etc/ssh/sshd_config
There is PermitRootLogin parameter. It must be "yes" to allow root login via ssh.
After modifying config file you must reload sshd.

svcadm refresh /network/ssh
2 Likes

Thanks GP81! I've just did what you told me. I've check the service and the result is:

STATE TIME FMRI
maintenance Sep_03 svc:/network/ssh:default

I also checked the parameter PermitRootLogin and it's already in Yes.
However i've refreshed the service and it still doesn't work.

Any other idea?

Run svcs -xv to get the log file location for the service that's failing. Review the logs and troubleshoot the error. You may also try svcadm -clear <svcname> to clear the error status before you refresh.

Why don't you use FTP?

even if

PermitRootLogin

is set to yes

if /etc/user_attr has

root::::type=role

set then RBAC is enabled and you won't be able to ssh in as root.