|
|
|
|
||||||
| comp.security.ssh SSH secure remote login and tunneling tools. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
/.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 |
|
![]() |
| Outils de la discussion | |
|
|