LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-15-2013, 09:23 AM   #1
rockstar05
Member
 
Registered: Dec 2011
Posts: 83

Rep: Reputation: Disabled
Question Question on SSH to server.


Hi All,

I have one problem, when I ssh to some server form my gateway machine(i.e. Linux) it regularly asking me about fingerprint,
Quote:
RSA key fingerprint is 35:0b:05:ea:er:eb:6c:86:ca:cd:ad:15:09:sz:0c:50.
Are you sure you want to continue connecting (yes/no)? yes
Can anyone tell me what is the meaning of above line and how can I stop asking him on every login.

Thanks for your help..
 
Old 08-15-2013, 09:37 AM   #2
blueh2o
Member
 
Registered: Jul 2011
Distribution: CentOS, Ubuntu, Fedora, Solaris, RHEL, Debian
Posts: 100

Rep: Reputation: 3
Check that your ~/.ssh/known_hosts file is writable.
 
Old 08-15-2013, 09:45 AM   #3
rockstar05
Member
 
Registered: Dec 2011
Posts: 83

Original Poster
Rep: Reputation: Disabled
My .ssh/known_hosts file shows,

-rw-r--r-- 1 rckstr count 39779 2013-08-13 15:55 known_hosts
 
Old 08-15-2013, 09:47 AM   #4
blueh2o
Member
 
Registered: Jul 2011
Distribution: CentOS, Ubuntu, Fedora, Solaris, RHEL, Debian
Posts: 100

Rep: Reputation: 3
Does it perhaps already contain an entry for the host in question?
 
Old 08-15-2013, 10:00 AM   #5
rockstar05
Member
 
Registered: Dec 2011
Posts: 83

Original Poster
Rep: Reputation: Disabled
No, When I ssh the server then it make entry in known_hosts file.
 
Old 08-15-2013, 10:08 AM   #6
blueh2o
Member
 
Registered: Jul 2011
Distribution: CentOS, Ubuntu, Fedora, Solaris, RHEL, Debian
Posts: 100

Rep: Reputation: 3
What are the permissions on your ~/.ssh directory?
 
Old 08-15-2013, 10:13 AM   #7
rockstar05
Member
 
Registered: Dec 2011
Posts: 83

Original Poster
Rep: Reputation: Disabled
drwx------ 2 rckstr count 512 2012-04-25 16:19 .ssh
 
Old 08-15-2013, 10:18 AM   #8
blueh2o
Member
 
Registered: Jul 2011
Distribution: CentOS, Ubuntu, Fedora, Solaris, RHEL, Debian
Posts: 100

Rep: Reputation: 3
You could always try using the -o "StrictHostKeyChecking no" option for ssh.
 
Old 08-15-2013, 11:08 AM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by rockstar05 View Post
No, When I ssh the server then it make entry in known_hosts file.
yes, if it is the first time you have SSHed into that system that is exactly what it will do.

Now if you have been there before and your end has changed the it will prompt again and every time your end changes it will prompt.

what you can do is vi the know_hosts file and verify that it is writing the data properly and or clear out your list of fingerprints and start a new connection to populate a clean fingerprint.
 
Old 08-16-2013, 10:07 AM   #10
rockstar05
Member
 
Registered: Dec 2011
Posts: 83

Original Poster
Rep: Reputation: Disabled
Sorry for late reply,

In known_host file every time it right when I am tiring to connect to new host.

when I try -o,

20:34:56 rckstr@lx374 ~$ ssh -o lx1441
command-line: line 0: Bad configuration option: lx1441
 
Old 08-16-2013, 10:14 AM   #11
blueh2o
Member
 
Registered: Jul 2011
Distribution: CentOS, Ubuntu, Fedora, Solaris, RHEL, Debian
Posts: 100

Rep: Reputation: 3
Quote:
Originally Posted by rockstar05 View Post
Sorry for late reply,
20:34:56 rckstr@lx374 ~$ ssh -o lx1441
command-line: line 0: Bad configuration option: lx1441
You have to actually put "StrictHostKeyChecking no" after the -o.

Code:
ssh -o "StrictHostKeyChecking no" lx1441
 
Old 08-19-2013, 08:13 AM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
But if it were me, I wouldn't do that. The fingerprint should not be changing, and I daresay that it isn't.

Try to connect, then L66K at the content of the known-hosts file. Is there an entry, or is there not?

Also, L66K at the fingerprint string: is it the same string, or is it not?

Does the software process that is attempting the connection actually have rights to this file/directory, or not? L66K at its logs. Stop "guessing" and "slapping at it."
 
  


Reply



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
Linux dedicated server newbie - SSH installation question redhat19 Linux - Server 3 01-31-2012 02:55 PM
ssh server config question sir-lancealot Linux - Server 5 08-20-2010 04:43 AM
SSH Server Connection Question kaplan71 Linux - Security 9 09-11-2008 11:32 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:13 PM.

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