ssh service location on Solaris 8


 
Thread Tools Search this Thread
Operating Systems Solaris ssh service location on Solaris 8
# 1  
Old 02-25-2010
ssh service location on Solaris 8

Hi

where can i find the ssh service on solaris 8 if "sshd" it is not available on /etc/init.d?

i want to restart the service.

i did a "which" and i found this. is this the right path? i want to double check since this is a prod server.
Code:
bash-2.03# which sshd
/usr/sbin/sshd

Thanks

Last edited by Yogesh Sawant; 02-26-2010 at 01:54 PM.. Reason: added code tags
# 2  
Old 02-26-2010
Hope this command will work
Code:
kill -HUP `cat /var/run/sshd.pid`

usually HUP signal is used to restart the process.
You must be a root user for performing this operations.



Please try this too if the above command is not working
Code:
/etc/init.d/sshd stop
/etc/init.d/sshd start

Use whereis command instead which.
# 3  
Old 02-26-2010
^ thanks for your reply.

sshd is not available on the /etc/init.d/ so i cannot execute ./sshd stop| start

As a follow up question, do you know how can i setup the sshd on /etc/init.d/? can i symlink it or something?

Thanks again.
# 4  
Old 02-27-2010
This is my sshd script from a Solaris 8 machine

Code:
#!/bin/sh

# Determine the process ids of the daemons and no other processes
pids=`/bin/ps -ef | \
      /bin/grep sshd | \
      /bin/egrep -v "grep|$$|start|stop" | \
      /bin/awk '{printf "%d ", $2}'`

case $1 in
'start')
        if [ "$pids" = '' ] ; then
                /usr/local/sbin/sshd
        else
                echo '' 1>&2
                echo 'WARNING: /etc/init.d/sshd already running' 1>&2
                echo '' 1>&2
        fi
        ;;
'reconfigure')
        if [ "$pids" != '' ] ; then
                if [ -f /var/run/sshd.pid ] ; then
                        /bin/kill -1 `/bin/cat /var/run/sshd.pid`
                elif [ -f /usr/local/etc/sshd.pid ] ; then
                        /bin/kill -1 `/bin/cat /usr/local/etc/sshd.pid`
                else
                        echo '' 1>&2
                        echo 'ERROR: missing sshd pid file' 1>&2
                        echo '' 1>&2
                fi
        else
                echo '' 1>&2
                echo 'ERROR: sshd is not running' 1>&2
                echo '' 1>&2
        fi
        ;;
'stop')
        if [ "$pids" != '' ] ; then
                /bin/kill $pids
        fi
        ;;
*)
        echo '' 1>&2
        echo 'usage: /etc/init.d/sshd {start|reconfigure|stop}' 1>&2
        echo '' 1>&2
        ;;
esac

You will have to modify the paths to the sshd executable.
# 5  
Old 02-27-2010
There is possibility of ssh startup script in the rc3.d directory or somewhere there.
Do a find
find / -name *ssh* -print
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running Script at a location with SSH

Hi All I have created a script which is running properly "Script". I want that script to run when I login into another server. in the code below: when ssh is executed it asks for password ..After entering password the user is logged in but the script does not run.... whereas when I exit... (1 Reply)
Discussion started by: pulkitbahl
1 Replies

2. Shell Programming and Scripting

Ssh config file different location

I'm trying use 'sed' to change a line on sshd_config file. But the problem is sshd_config file can be two different locations.(eg: /etc/ssh/sshd_config or /usr/local/ssh/sshd_config) Was wondering how to write a shell script to search or mention the sshd_config location? (3 Replies)
Discussion started by: pjeedu2247
3 Replies

3. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

4. Shell Programming and Scripting

Executing remote application using ssh without full reference to its location

Hello again :) , My script has an ssh command to run a script on a remote machine. The script has commands such as sqlplus and unzip. However, the return I get in my own terminal says it can't find sqlplus and unzip. the ssh command is: ssh user@host "cd ScriptDir; ./Script.sh" and the... (6 Replies)
Discussion started by: jangozo
6 Replies

5. Solaris

Helpme !! ssh service in maintenance mode

Hi Guys, Virtual Machine - Solaris 10 ssh service is in maintenance mode, when i tried to disable it it got disabled but when i enabling it ( svcadm enable ssh) it is coming in maintenance mode...... Pls help (10 Replies)
Discussion started by: saurabh84g
10 Replies

6. Programming

doing a socket connection using ssh service

Trying to establish a socket connection using ssh service - but want to use different login name for ssh than what currently logged in as - if under shell know to use ssh -l <login-name> host - however - not sure how to tell o.s. to use different login name when use connect command (2 Replies)
Discussion started by: clcoh11
2 Replies

7. UNIX and Linux Applications

Central Location for all ssh Keys and Settings Unattended Secure File Transfer

I am developing an application that submits command line file transfers using ssh (Sun to Sun) and Tectia ssh (Sun to Windows Server) embedded in the code. Potentially many different trusted people will start the programs. Is there a way to have all the settings and keys localized so that there is... (0 Replies)
Discussion started by: PowersThatB
0 Replies

8. Shell Programming and Scripting

Create a list of commands in a central location, and then run them all remotely through a ssh here

I'm trying to write a script that in the end will from one central location hop to a bunch of servers and then run a series of ping tests. The thing is, the list of devices that needs to be pinged is going to be different for each server. So what I want to do is be able to do is read through the... (0 Replies)
Discussion started by: DeCoTwc
0 Replies

9. IP Networking

how to install ssh service in linux

hello,I am new in linux and want to know how to install ssh service in my computer so that others can connect to it,thank you! (15 Replies)
Discussion started by: hwk07
15 Replies

10. Solaris

trouble auto connecting ssh 3.6.1 (Solaris 8) to ssh 3.0.1 (Solaris 6)

I am currently setting up rdiff-backup to use ssh to connect and remotely backup and retrieve data. I am doing so by creating rsa keys for each server and copying the relevant key to the /.ssh folder on the relevant server. All seems to work well when severs running solaris 8 with ssh 3.6.1 are... (6 Replies)
Discussion started by: falklandtim
6 Replies
Login or Register to Ask a Question

Featured Tech Videos