# SSH connection failed...



## rubijn (Jan 19, 2009)

Hi,
I'm a novice in FreeBSD environement. I use a FreeBSD Server 7.0 by OVH.

I have some trouble with ssh connexion. I have installed Mysql, Dovecot, apache, php, postfix. And after a reboot my ssh connexion doesn't work... (Connexion refused)... 

Fortunaly OVH propose NetBoot for this kind of situation. I can boot on my server, connect via ssh, mount my / and see my hd. I change startup rc.conf and remove one buy one starting daemond (very fastidious because i have to switch between netboot and classic HD Boot)... And ssh work all time except when i activate apache22_enable="YES"... If i reboot with this directive i could not connect via ssh to my server... 

here is my rc.conf
sshd_enable="YES"
named_enable="YES"
ntpdate_enable="YES"
ntpdate_hosts="XXXX"
fsck_y_enable="YES"
keymap="fr.iso.acc"
ifconfig_re0="inet XXXXX netmask 255.255.255.0 broadcast XXXX"
defaultrouter="XXXX"
hostname="XXXX"
mysql_enable="YES"
dovecot_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
postfix_enable="YES"
#apache22_enable="YES"

Someone have an idea ? How i can find informations, i haved look in /var/logs but i do not find anay usefull informations.

Thanks.


----------



## danger@ (Jan 19, 2009)

do you run apache on port 22 or sshd on port 80 by any chance?


----------



## brd@ (Jan 19, 2009)

Is your Apache configured with SSL and is it hanging on entering a passphrase? This bit me a few times.


----------



## rubijn (Jan 19, 2009)

yes i does.... So what coul i do ?


----------



## rubijn (Jan 19, 2009)

HTTP listen 80
SSH 22

Effectively, my Apache is configured with SSL and hanging a passphrase...


----------



## brd@ (Jan 19, 2009)

Remove the passphrase from the key is one way.. or just don't have it start automatically on boot.

Ideally ssh should be one of the very first things to start, but I haven't investigated how to make that happen.


----------



## rubijn (Jan 19, 2009)

thanks for the answer.
It's work, when i remove apache from rc.conf... But the solution is not very fine for me (restart manualy apache every boot...) 

There is no other ways ? I don't understand why the pass key prompt block the ssh porcess ?


----------



## DutchDaemon (Jan 19, 2009)

http://www.modssl.org/docs/2.7/ssl_faq.html#ToC31


----------



## rubijn (Jan 19, 2009)

Thanks it's works ! Exactly like i want 

Anybody could explain me shortly why apache prompt for passphrase block ssld ?


----------



## DutchDaemon (Jan 19, 2009)

The scripts in /usr/local/etc/rc.d are executed in order and sequentially (one after another). In other words: if any of those scripts hangs, the scripts behind it will not execute. I guess the apache start script executes before the ssh start script.


----------

