Ssh in Solaris

This post is about service ssh in solaris 9 or 10

Solaris 9
Disable service ssh ?

bash>  /etc/init.d/sshd stop
bash> /etc/rc3.d/S89sshd stop

Enable service ssh ?

bash> /etc/init.d/sshd start
bash> /etc/rc3.d/S89sshd start

Refresh service ssh ?

bash> kill -HUP `cat /var/run/sshd.pid`

Solaris 10
First you can check service ssh with command

bash> svcs | grep ssh
online         Jan_21   svc:/network/ssh:default

If status ssh offline, you can make online with command:

bash> svcadm enable -t network/ssh:default
bash> /lib/svc/method/sshd start

Disable service ssh ?

bash> svcadm disable -t network/ssh:default

Restart service ssh ?

bash> svcadm restart network/ssh:default
bash> /lib/svc/method/sshd restart

Refresh service ssh ?

bash> svcadm refresh network/ssh:default

For a root enable connect to host via ssh service

bash> vi /etc/ssh/sshd_config
[....]
# Valid options are yes, without-password, no.
PermitRootLogin no
[....]

Replace no with yes, after that save the edited configuration.
Don't forget for the restart service ssh, after edit configuration.

Printed from: http://sysinfo.bascomp.org/solaris/ssh-in-solaris/ .
© 2012.

8 Comments   »

  • kurgan says:

    I have a situation where we have ssh running on a server and when a user logs in the users project is not picked up. Meaning, any process the user runs does not run under the user's project. But, if I do a "su - username" the project is picked up. Does this have to do with ssh config?

  • Hendrawan says:

    You can check whether the user in the default project was you define before

    user $ projects or
    user $ id -p
    user $ grep username /etc/user_attr

    hope this help..

  • Murat says:

    Thanks for the information !

  • Hendrawan says:

    You're welcome Murat.

  • Sujith John says:

    Hi ,
    I tried all the above methods to enable/online ssh in Solaris 10, but it doesn't work.

    Any help further please ?

    REgards ,
    John

    • Hendrawan says:

      What's state of the ssh now, enabled or online, online means there's still another dependencies services in disabled mode, so the ssh still not work, you can check which dependencies services in disabled states.
      Enabled means ssh is working.

      Or maybe you can shared ssh status here

      *sory for late reply*

  • Hendrawan says:

    Ok summer, no problem, but don't forget the keep the author name

Trackbacks/Pingbacks

  1. summerpalace

RSS feed for comments on this post , TrackBack URI

Leave a Reply