Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
vi /etc/ssh/sshd_config
egrep -i 'Pubkey|Password|Listen' /etc/ssh/sshd_config | grep -v '^#'
    PermitRootLogin without-password
    PubkeyAuthentication yes
    PasswordAuthentication no

on an OpenBSD 5.1 server. But I can still login with FileZilla, and FileZilla only knows my password AFAIK (or not?).

How can I restrict any ssh/scp/sftp access to only accept key auth?

UPDATE: clinet side is a Scientific Linux 6.3, afaik the key is not cached.

share|improve this question
up vote 1 down vote accepted

Assuming your OS is Microsoft Windows, a SSH agent (like pageant) may have cached your key if you already connected your server using, for example, putty. see this page on Filezilla wiki for details. So your server is probably setup as needed.

share|improve this answer
I updated the Q – gasko peter Jan 17 '13 at 12:52
There also is a ssh agent in Linux, you can test if your key is cached using "ssh-add -l" to have a list of cached keys – Arcadien Jan 17 '13 at 12:55
I will check that one and update the q or accept answer – gasko peter Jan 17 '13 at 13:03
There is 1 key listed, so that means my key is cached? how can I clear this cache to test that filezilla really uses this? – gasko peter Jan 17 '13 at 16:42
a good idea is always to read documentation. You will quickly find what you are searching in "man ssh-add" :) – Arcadien Jan 17 '13 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.