# SSH and SFTP settings



## time4e (Apr 13, 2013)

I have configured sshd on FreeBSD 9.1 to use private/public keys for authentication and it works without issue using any SSH clients. However when using an SFTP client such as Cyberduck I am not required to use SSH keys, it logs me in with just the username/password. I was under the impression that SFTP used the same settings as sshd_config. 

*T*his is my current setting for SFTP within sshd_config:

```
# override default of no subsystems
Subsystem       sftp    /usr/libexec/sftp-server
```

How do I force SFTP clients to use the same SSH keys as SSH?

Thanks,
-Tim


----------



## fonz (Apr 14, 2013)

time4e said:
			
		

> How do I force SFTP clients to use the same SSH keys as SSH?


Does something along the lines of the following (adjust as you see fit) help:

```
Subsystem       sftp    /usr/libexec/sftp-server
   PubkeyAuthentication              yes
   PasswordAuthentication            no
   ChallengeResponseAuthentication   no
```


----------



## time4e (Apr 14, 2013)

@fonz,

Thanks for your reply, it worked!

-tim


----------

