Server Fault is a question and answer site for system and network administrators. 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

When I grep in the etc folder, I get this message:

grep: ssh_host_rsa_key: Permission denied.

Since I am on cygwin, I can't use sudo or something else.

Please let me know how to find it out.

share|improve this question
up vote 7 down vote accepted
ssh-keygen -l -f /etc/

This command will output just the fingerprint like this:

2048 9e:1a:5e:27:16:4d:2a:13:90:2c:64:41:bd:25:fd:35 /etc/ssh/

-f is for filename
-l is to output the fingerprint of the public key file.

Output consists of three parts

  • bit length of the key: 2048
  • finger print of the key: 9e:1a:5e:27:16:4d:2a:13:90:2c:64:41:bd:25:fd:35
  • name of the key file: /etc/ssh/

I would like to request experts on this matter to point any shortcomings in this method.

share|improve this answer
You left out a file folder in the command line. The file is under /etc/ssh/'filename' You put /etc/'filename' Cheers! – user141554 Oct 17 '12 at 21:57

Sudo is aditional package, which has to be installed during Cygwin installation. Have you tried su to become superuser?

Anyway, you can always view content of the Cygwin files from Windows...

share|improve this answer
I have tried su, but it did not work. I am guessing we have a vanilla Cygwin installation. Also I do not have the install permissions on the server. I will get this installed and try. I was not able to open these files from text editor as well. – Nanda Feb 4 '11 at 13:15
Fortunately I have hit upon a solution from ssh documentation. I have posted it below as an answer. Thanks for your insight! – Nanda Feb 4 '11 at 13:16

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.