Problem on sshd

Problem on sshd

Post by A. Nony, Mous » Sun, 10 Nov 2002 14:33:32



Sorry if this has been done to death.

I am trying to set up sshd on my SPARCStation, so that I can access it
from other machines in the haus. Configuration is as follows:

SPARCStation 1+, Solaris 2.7, 25 (I think) MHz sun4c sparc, 64 MBytes
memory, 850 (I think) MBytes disque.

OpenSSL 0,9,6g 9August2k2
OpenSSH 3,4p1
prngd
ANDIrand-0.7-5.7-sparc-1.pkg

---

I do the following to attempt to start the daemon:

1) /usr/local/bin/ssh-keygen -b 1024 -t rsa
2) rm /var/spool/prngd/pool && /usr/local/sbin/prngd -n
/var/spool/prngd/pool
3) /usr/local/sbin/sshd -g 300 -b 1024

And it reports that it cannot find key-files

I have run ssh-keygen -y, and it shows me the key

What am I doing wrong, and how can I fix it?

At least, I have fixed the lack of entropy problem.

Thanks in advance.

--
A. Nony, Mouse

Address purposely munged to foil address-harvesting
robots. to contact me:

maus <AT> *space <DECIMAL> org

-- Life is short. Forgive quickly. Kiss slowly. ~ Robert Doisneau

 
 
 

Problem on sshd

Post by Scott Ypm » Mon, 11 Nov 2002 08:11:03


Did you take a look at /etc/sshd_config?  This is where sshd will look
for the path to the key-files...

S


>Sorry if this has been done to death.

>I am trying to set up sshd on my SPARCStation, so that I can access it
>from other machines in the haus. Configuration is as follows:

>SPARCStation 1+, Solaris 2.7, 25 (I think) MHz sun4c sparc, 64 MBytes
>memory, 850 (I think) MBytes disque.

>OpenSSL 0,9,6g 9August2k2
>OpenSSH 3,4p1
>prngd
>ANDIrand-0.7-5.7-sparc-1.pkg

>---

>I do the following to attempt to start the daemon:

>1) /usr/local/bin/ssh-keygen -b 1024 -t rsa
>2) rm /var/spool/prngd/pool && /usr/local/sbin/prngd -n
>/var/spool/prngd/pool
>3) /usr/local/sbin/sshd -g 300 -b 1024

>And it reports that it cannot find key-files

>I have run ssh-keygen -y, and it shows me the key

>What am I doing wrong, and how can I fix it?

>At least, I have fixed the lack of entropy problem.

>Thanks in advance.


 
 
 

Problem on sshd

Post by A. Nony, Mous » Tue, 12 Nov 2002 12:28:06



Quote:> Did you take a look at /etc/sshd_config?  This is where sshd will look
> for the path to the key-files...

> S

I will look. I have also bought myself the O'reilley's book on SSH, and
will be studying it this week between my classes, so I hopefully will have
a resolution soon. Updates forthcoming.

squeak

--
A. Nony, Mouse

Address purposely munged to foil address-harvesting
robots. to contact me:

maus <AT> *space <DECIMAL> org

-- Life is short. Forgive quickly. Kiss slowly. ~ Robert Doisneau

 
 
 

Problem on sshd

Post by Holger Ap » Thu, 14 Nov 2002 23:27:35


Quote:> I do the following to attempt to start the daemon:

> 1) /usr/local/bin/ssh-keygen -b 1024 -t rsa
> 2) rm /var/spool/prngd/pool && /usr/local/sbin/prngd -n
> /var/spool/prngd/pool
> 3) /usr/local/sbin/sshd -g 300 -b 1024

> And it reports that it cannot find key-files

> I have run ssh-keygen -y, and it shows me the key

> What am I doing wrong, and how can I fix it?

> At least, I have fixed the lack of entropy problem.

> Thanks in advance.

You did only generate the user-keys, but what you need is a host-key.

A good way to start/stop the sshd is to use the script provided in the
contrib/solaris directory (You can see the method for key generation
as well):

---->

#!/sbin/sh
# Donated code that was put under PD license.
#
# Stripped PRNGd out of it for the time being.

AWK=/usr/bin/awk
CAT=/usr/bin/cat
KILL=/usr/bin/kill
PS=/usr/bin/ps
XARGS=/usr/bin/xargs

prefix=%%openSSHDir%%
etcdir=%%configDir%%
piddir=%%pidDir%%

SSHD=$prefix/sbin/sshd
PIDFILE=$piddir/sshd.pid
SSH_KEYGEN=$prefix/bin/ssh-keygen
HOST_KEY_RSA1=$etcdir/ssh_host_key
HOST_KEY_DSA=$etcdir/ssh_host_dsa_key
HOST_KEY_RSA=$etcdir/ssh_host_rsa_key

killproc() {
   _procname=$1
   _signal=$2
   ${PS} -u root | ${AWK} '/'"$_procname"'$/ {print $1}' | ${XARGS}
${KILL}

Quote:}

checkkeys() {
    if [ ! -f $HOST_KEY_RSA1 ]; then
        ${SSH_KEYGEN} -t rsa1 -f ${HOST_KEY_RSA1} -N ""
    fi
    if [ ! -f $HOST_KEY_DSA ]; then
        ${SSH_KEYGEN} -t dsa -f ${HOST_KEY_DSA} -N ""
    fi
    if [ ! -f $HOST_KEY_RSA ]; then
        ${SSH_KEYGEN} -t rsa -f ${HOST_KEY_RSA} -N ""
    fi

Quote:}

stop_service() {
    if [  -r $PIDFILE  -a  ! -z ${PIDFILE}  ]; then
        PID=`${CAT} ${PIDFILE}`
    fi
    if [  ${PID:=0} -gt 1 -a  ! "X$PID" = "X "  ]; then
        ${KILL} ${PID}
    else
        echo "Unable to read PID file, killing using alternate method"
        killproc sshd TERM
    fi

Quote:}

start_service() {
    # XXX We really should check if the service is already going, but
    # XXX we will opt out at this time. - Bal

    # Check to see if we have keys that need to be made
    checkkeys

    # Start SSHD
    echo "starting $SSHD... \c"         ; $SSHD

    sshd_rc=$?
    if [ $sshd_rc -ne 0 ]; then
        echo "$0: Error ${sshd_rc} starting ${SSHD}... bailing."
        exit $sshd_rc
    fi
    echo done.

Quote:}

case $1 in

'start')
    start_service
    ;;

'stop')
    stop_service
    ;;

'restart')
    stop_service
    start_service
    ;;

*)
    echo "$0:  usage:  $0 {start|stop|restart}"
    ;;
esac

 
 
 

1. Trouble connecting to an SSHD box(RH7 newest SSHD)

Hi All,

I need some help with sshd. I have installed it generated the host key files
and am running sshd protocal 1 on my RH7 box, this is the latest version of
the software. When I try to connect to it via secure crt with the ssh1
option and a keyfile set up I get an error from SecureCRT that says "Packet
Length received from server > 16K" Any help on this is much appreciated.

Thx,
-Ben


Thx again.

2. BBS software for Linux?

3. sshd problem (Access denied)

4. Error Msg During Setup

5. Still more problems with sshd on Solaris 9

6. port eavesdropping?

7. ssh connections refused, sshd problem

8. Everything you EVER DID is STILL STORED IN YOUR PC - asd ucdeubwxyvdeyzhi345uq9tu

9. sshd/Linux problems

10. sshd problems

11. sshd problem

12. CLOSE_WAIT problem between sshd and ldap

13. sshd problems