# OpenSSH start but does not work



## SIFE (Aug 12, 2009)

Salamo Alikom
i had install both OpenSSL and OpenSSH-portable from ports then i start by typing :

```
./etc/rc.d/sshd start
```
it is start normaly with out any msg but when i try to connect from remote computer or local i get this message :

```
ssh :connect to host 10.0.0.1 port 22 connection refused
```
the output of :
sockstat -l -P tcp
is nothing .


----------



## gripek (Aug 12, 2009)

Try add to:

```
/etc/rc.conf
```
line:

```
sshd_enable="YES"
```
and reboot system.

This metod work on me.


----------



## danger@ (Aug 12, 2009)

in case of openssh-portable, you need to start it with /usr/local/etc/rc.d/openssh rc.d script.

Don't forget to set the 
	
	



```
openssh_enable="YES"
```
 variable in /etc/rc.conf.


----------



## SIFE (Aug 12, 2009)

thx ,this help Mr danger@ ,i wonder why this is not included in documentation .


----------



## ale (Aug 12, 2009)

SIFE said:
			
		

> i wonder why this is not included in documentation .


Well, if any single port should be in documentation...


----------



## anomie (Aug 12, 2009)

SIFE said:
			
		

> i had install .. OpenSSH-portable from ports...



Do you know openssh is already included in the base system? (That's what the rc script that you were initially using belongs to.)


----------



## SIFE (Aug 13, 2009)

@anomie
i know that but when it is not work i decide to install OpenSSH-portable .
@gripek
i try your suggestion and it is work for me .
i found to star openssh server that come with sys is first to add it in rc.conf and then reboot sys finaly start it from terminal ,i hope this will be as not in documentation .


----------



## ale (Aug 13, 2009)

SIFE said:
			
		

> i found to star openssh server that come with sys is first to add it in rc.conf and then reboot sys finaly start it from terminal ,i hope this will be as not in documentation .


There is no need to restart.
Just enable it in /etc/rc.conf and start it.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/openssh.html


----------



## ironmikie (Aug 13, 2009)

Or if you just want to test it before adding it to /etc/rc.conf you can use: /etc/rc.d/sshd forcestart


----------

