Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-24-2010, 08:49 AM   #1
Registered: Aug 2004
Posts: 65

Rep: Reputation: 15
sftp issue

Trying to sftp (get) a file, and am getting the following message:

spawn sftp -oPort=10022
Connecting to
The authenticity of host ' (' can't be established.
DSA key fingerprint is 66:64:07:cc:39:89:56:2b:3b:4c:fd:cc:3d:2a:7a:9c.
Are you sure you want to continue connecting (yes/no)?

Is this an issue with keys? Where are the keys on a sftp client stored? I am running this sftp script from a different directoy than normal if that matters.
Old 11-24-2010, 09:08 AM   #2
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
This means that your local machine doesn't know about the fingerprint (DSA key) of the remote server. The ssh daemon asks if you trust the remote server and eventually import (add) the DSA key into the file $HOME/.ssh/known_hosts. This happens only the first time you try to connect to an unknown server, then you will never be prompted again unless:
  1. you remove the key from the known_hosts file
  2. the fingerprint of the remote server changes for some reason.
Old 11-24-2010, 09:11 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
My guess is that PKI authentication isn't used, and the keys have been replaced on the server. The fingerprint from the server, doesn't match the information in your .ssh/known_hosts file. It could also be a man-in-the-middle attack. If the former is true, you could delete the line for this server in ~/.ssh/known_hosts. If the latter, it isn't save to proceed.
Old 11-24-2010, 10:07 AM   #4
Registered: Aug 2004
Posts: 65

Original Poster
Rep: Reputation: 15
Thanks for the response colucix. Once I replied "yes" to the message, an entry was made $HOME/.ssh/known_hosts file. A sftp after that I was not prompted again. A change in the key on the server side at this point would probably cause a prompt message again I assume.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SFTP file upload bash script issue. moodah Programming 1 10-07-2010 11:55 PM
[SOLVED] sftp issue c0pe Red Hat 3 07-12-2010 10:02 AM
Sftp log issue on RHEL 4 ZAMO Linux - Enterprise 3 03-10-2010 12:32 PM
sftp issue on rhel 5.4 protos78 Red Hat 12 01-12-2010 03:47 PM
How do I use sftp to upload my web site? (no sftp tar command) johnMG Linux - Networking 6 06-21-2005 10:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration