# SSH connection issue after SSH Keys config



## fred974 (Mar 1, 2013)

Hello,

I made some changed to my FreeBSD 8.3 box.
I set SSH Keys and SSH-Agent. And at first it worked ok but when I restarted sshd(8), I get


```
srv-web# service sshd restart
Stopping sshd.
SELECT ssh_host_key from services_ssh: not found
SELECT ssh_host_key_pub from services_ssh: not found
SELECT ssh_host_dsa_key from services_ssh: not found
SELECT ssh_host_dsa_key_pub from services_ssh: not found
SELECT ssh_host_ecdsa_key from services_ssh: not found
SELECT ssh_host_ecdsa_key_pub from services_ssh: not found
SELECT ssh_host_rsa_key from services_ssh: not found
SELECT ssh_host_rsa_key_pub from services_ssh: not found
Starting sshd.
```

And now am unable to ssh login to the box.

Could you please help me to fix this issue.

I already checked the files it's complaining about and they are all in /etc/ssh


```
srv-web# cd /etc/ssh
srv-web# ls
moduli                  ssh_host_dsa_key        ssh_host_key            ssh_host_rsa_key        sshd_config
ssh_config              ssh_host_dsa_key.pub    ssh_host_key.pub        ssh_host_rsa_key.pub
```


----------



## wblock@ (Mar 1, 2013)

That SELECT message is unfamiliar.  This may be a customization specific to FreeNAS and not FreeBSD.  Have you asked in the FreeNAS forums?


----------



## fonz (Mar 1, 2013)

wblock@ said:
			
		

> That SELECT message is unfamiliar.  This may be a customization specific to FreeNAS and not FreeBSD.


Moreover, I couldn't find any reference to it anywhere in /usr/src/crypto/openss[hl]/. I suspect that FreeNAS uses either FreeNAS-specific modifications, as suggested by @wblock@, or maybe even a completely different SSH implementation.


----------



## SirDice (Mar 1, 2013)

Perhaps FreeNAS uses security/pam_mysql? Or some other PAM module with a database backend? The "SELECT .... FROM ...." looks distinctly like SQL.


----------



## fred974 (Mar 4, 2013)

Well, this error that I get is not on FreeNAS but my FreeBSD jail. Sorry for the confusion, i didn't realized i typed in the wrong title. My ssh connection was working ok. I followed the tutorial below and since then I cannot restart sshd. I even rolled back all, the changes

http://www.bsdguides.org/2012/freebsd-org-intrusion-and-how-to-use-ssh-keys-and-ssh-agent/


----------

