PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > Question about known_hosts
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

Question about known_hosts

Réponse
 
LinkBack Outils de la discussion
Vieux 03/11/2006, 10h25   #1
Timo Jeranko
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Question about known_hosts

I'm using the OpenSSH client on Red Hat Linux. Does anyone know how to
set up the known_hosts file in the .ssh folder to log in to and scp
into remote machines without being prompted for a password?

much appreciated,

Timo Jeranko

  Réponse avec citation
Vieux 03/11/2006, 13h05   #2
Cezary Morga
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Question about known_hosts

Timo Jeranko wrote:

> I'm using the OpenSSH client on Red Hat Linux. Does anyone know how to
> set up the known_hosts file in the .ssh folder to log in to and scp
> into remote machines without being prompted for a password?


You have to copy your private key onto the remote machine, and add it
to .ssh/authorized_keys. For example:

on local machine do:
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/my_key
login to the remote machine, and:
cd ~/.ssh
cat my_key >> authorized_keys
rm my_key

You're done.

PS. Some paths may vary depending on local and remote machine' OS.
--
Cezary Morga
  Réponse avec citation
Vieux 10/11/2006, 22h47   #3
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Question about known_hosts

In article <454b3e80@news.home.net.pl> Cezary Morga <cezarym@data.pl> writes:
>Timo Jeranko wrote:
>
>> I'm using the OpenSSH client on Red Hat Linux. Does anyone know how to
>> set up the known_hosts file in the .ssh folder to log in to and scp
>> into remote machines without being prompted for a password?

>
>You have to copy your private key onto the remote machine, and add it
>to .ssh/authorized_keys. For example:
>
>on local machine do:
>ssh-keygen -t rsa
>scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/my_key
>login to the remote machine, and:
>cd ~/.ssh
>cat my_key >> authorized_keys
>rm my_key


Or maybe simpler:

ssh-keygen -t rsa
ssh user@remote 'cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub

And though that wasn't what the question asked for (note "known_hosts"),
it was probably the right answer.

--Per Hedeland
per@hedeland.org
  Réponse avec citation
Vieux 05/01/2007, 09h29   #4
santhi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Question about known_hosts

/.ssh/known_hosts file is a local user database. This is used for
server authentication.
The client checks this file for the remote machine's entry to
authenticate the server.
Use Public key authenitcation for transfering files using scp. For
this, we should copy the
public key file to /.ssh/authorized_keys on remote machine rather than
private key.


Per Hedeland wrote:
> In article <454b3e80@news.home.net.pl> Cezary Morga <cezarym@data.pl> writes:
> >Timo Jeranko wrote:
> >
> >> I'm using the OpenSSH client on Red Hat Linux. Does anyone know how to
> >> set up the known_hosts file in the .ssh folder to log in to and scp
> >> into remote machines without being prompted for a password?

> >
> >You have to copy your private key onto the remote machine, and add it
> >to .ssh/authorized_keys. For example:
> >
> >on local machine do:
> >ssh-keygen -t rsa
> >scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/my_key
> >login to the remote machine, and:
> >cd ~/.ssh
> >cat my_key >> authorized_keys
> >rm my_key

>
> Or maybe simpler:
>
> ssh-keygen -t rsa
> ssh user@remote 'cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub
>
> And though that wasn't what the question asked for (note "known_hosts"),
> it was probably the right answer.
>
> --Per Hedeland
> per@hedeland.org


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h00.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10569 seconds with 12 queries