# problem SSH connection



## spon (Mar 31, 2010)

I installed ssh on my freebsd, as:

1)in /etc/rc.conf --> sshd_enable="YES" 

2)/etc/rc.d/sshd start

3)edit "/etc/ssh/ssh_config"

4)/etc/rc.d/sshd reload.


When i try to connect from a windows xp pc , the connection is refused!
On windows xp pc I have installed "SSHSecureShellClient.exe"

Does someone know to help me?
Thanks


----------



## SirDice (Mar 31, 2010)

spon said:
			
		

> 3)edit "/etc/ssh/ssh_config"


If you want to change options for the ssh daemon you'll need to edit sshd_config.



> When i try to connect from a windows xp pc , the connection is refused!
> On windows xp pc I have installed "SSHSecureShellClient.exe"



Try PuTTY. 

Also make sure sshd is actually running. Check with [cmd=]sockstat[/cmd] and verify it's listening on port 22.


----------



## spon (Mar 31, 2010)

Hi SirDice,
this is my sockstat output:


```
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root     login      1570  3  dgram  -> /var/run/logpriv
root     telnetd    1569  0  tcp4   192.168.0.191:23      192.168.0.126:2916
root     telnetd    1569  1  tcp4   192.168.0.191:23      192.168.0.126:2916
root     telnetd    1569  2  tcp4   192.168.0.191:23      192.168.0.126:2916
root     sshd       1422  3  tcp6   *:22                  *:*
root     sshd       1422  4  tcp4   *:22                  *:*
root     inetd      929   5  tcp4   *:21                  *:*
root     inetd      929   6  tcp6   *:21                  *:*
root     inetd      929   7  tcp4   *:23                  *:*
root     inetd      929   8  tcp6   *:23                  *:*
root     login      752   3  dgram  -> /var/run/logpriv
smmsp    sendmail   694   3  dgram  -> /var/run/log
root     sendmail   690   3  dgram  -> /var/run/logpriv
root     sendmail   690   4  tcp4   127.0.0.1:25          *:*
root     syslogd    459   4  dgram  /var/run/log
root     syslogd    459   5  dgram  /var/run/logpriv
root     syslogd    459   6  udp6   *:514                 *:*
root     syslogd    459   7  udp4   *:514                 *:*
root     devd       367   5  stream /var/run/devd.pipe
root     moused     342   5  stream /var/run/devd.pipe
```


----------



## spon (Mar 31, 2010)

ok,
i tried PuttY and all works!
Thanks


----------



## DutchDaemon (Mar 31, 2010)

Is this box directly connected to the Internet as well? Then get that telnetd out of there a.s.a.p.


----------



## anomie (Mar 31, 2010)

Looks like OP has enabled inetd (including telnetd and ftpd), along with standalone telnetd. 

@spon: Is that what you intended? If not, do you understand how to disable them? If you don't need these (or even if you do), they pose a security risk for you.


----------

