LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2010, 01:42 PM   #1
milomak
Member
 
Registered: May 2009
Posts: 147

Rep: Reputation: 18
[Solved]Creating same SSH keys on different distros but same machine


On my desktop I run a number of distros. I often ssh into the machine. However depending on which distro I am using, the RSA key is different.

So what I will do is delete ~/.ssh/known_hosts on the machine I am using and ssh in.

what i was wondering is whether using ssh-keygen and creating the same passphrase for the distros would remove this problem?

Last edited by milomak; 02-18-2010 at 10:51 AM.
 
Old 02-17-2010, 03:18 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you're free to copy the keys between machines / distros as much as you want. no need to recreate them
 
Old 02-17-2010, 03:35 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
So far as ssh is concerned, different distros = completely different computers, even if they are physically the same.

ssh is very security-conscious and when properly set up will not connect if it thinks anything could possibly be wrong (this is absolutely the correct behaviour, otherwise, why are you using the secure shell ?)

So you will have to set up the keys on the machine you ssh from, then copy them over to each different distro on your desktop, that you would like to ssh to, one at a time.

Looks like you are going to be doing a lot of rebooting between distros
 
Old 02-17-2010, 03:47 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by milomak
On my desktop I run a number of distros. I often ssh into the machine. However depending on which distro I am using, the RSA key is different.
Just to further clarify here: you're referring to the host key for sshd.

Quote:
Originally Posted by milomak
So what I will do is delete ~/.ssh/known_hosts on the machine I am using and ssh in.
Better options:
  1. Give each distro its own IP / hostname; or
  2. copy the host keys in /etc/ssh (ssh_host_dsa_key*, ssh_host_rsa_key*) from one distro to all the others.

Quote:
Originally Posted by milomak
what i was wondering is whether using ssh-keygen and creating the same passphrase for the distros would remove this problem?
Nope.

Last edited by anomie; 02-17-2010 at 03:48 PM.
 
Old 02-18-2010, 10:51 AM   #5
milomak
Member
 
Registered: May 2009
Posts: 147

Original Poster
Rep: Reputation: 18
Thanks guys. I went with anomie's option 2.
 
  


Reply

Tags
different, distros, keys, ssh



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
SSH host keys are not being read correctly from .ssh/known_hosts. bartonski Linux - Software 3 10-29-2009 04:40 PM
not able to ping a machine but can do ssh to machine , wanna run vnc client amolgupta Linux - Software 4 07-28-2009 05:17 PM
SSH host keys VS SSH keys kenneho Linux - Security 3 09-11-2008 06:03 AM
Why is Ubuntu's keys for vi/vim different than other distros? Micro420 Ubuntu 11 02-26-2008 02:06 PM
Configuring SSH to accept only keys (already have keys) fr0st Linux - Security 3 11-04-2003 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:08 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