# cannot ssh



## hirohitosan (Jan 19, 2009)

Hi there.
I enable sshd through inetd. When I try to connect:

```
ssh my.server
ssh_exchange_identification: Connection closed by remote host
```
and on my server a message appear:

```
sshd[1016]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
```
do I need to add something like a dsa key?

thanks


----------



## danger@ (Jan 19, 2009)

yes, it has to be there.

If you run `# /etc/rc.d/sshd forcestart` it should be automatically generated.

Then you can stop sshd and start it from within inetd (if you like that more)...


----------



## hirohitosan (Jan 19, 2009)

danger@ said:
			
		

> Then you can stop sshd and start it from within inetd (if you like that more)...


well I don't know which is the best way to start. Within ined or stand alone ...
I enable inetd and start ftpd and sshd with. I was thinking to use inetd, otherwise I have no reason to start it at boot


----------



## DutchDaemon (Jan 19, 2009)

Use inetd for moderate use of ssh (a few logins per day). Use rc.conf if you have a lot of ssh login activity. In that case it saves a lot of overhead having sshd run as a daemon. That goes for everything using either inetd or rc.conf (like ftpd).


----------



## SirDice (Jan 19, 2009)

hirohitosan said:
			
		

> I was thinking to use inetd, otherwise I have no reason to start it at boot


If you don't use it don't run it


----------



## ale (Jan 19, 2009)

Try `$ ssh $USER@$HOST`
Where $HOST is the remote host where sshd is running
and $USER is a user defined in the remote host


----------



## hirohitosan (Jan 20, 2009)

SirDice said:
			
		

> If you don't use it don't run it


well it was always a dilemma for me this inetd. It worth to run it for spawn two servers like sshd and ftpd, or it is almost the same thing to run the two servers in standalone?

Which of you guys use inetd and for what?


----------



## kamikaze (Jan 20, 2009)

I use inetd to run the fingerd.


----------



## DutchDaemon (Jan 20, 2009)

hirohitosan said:
			
		

> well it was always a dilemma for me this inetd. It worth to run it for spawn two servers like sshd and ftpd, or it is almost the same thing to run the two servers in standalone?



Like I said earlier, it really depends on how often these services are used. If you have people ssh'ing and ftp'ing into your server every few minutes, I would most certainly run them in daemon mode, just to save on the overhead of starting up and shutting down these servers from inetd. If you're the only user, and you only log in once or twice a day, inetd is good enough.


----------

