Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-04-2005, 02:36 AM   #1
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Rep: Reputation: 15
ssh using public key

fedora core - 2

i want to login to a remote server thru ssh using public key authentication. The remote server is on suse. suppose the username on the remote box is "user1" .
# ssh-keygen -t dsa -b 2048
i created one user with same username "user1" in my box.
i used the above command & placed the private key file in /home/user1/.ssh in my machine & placed the public key file in /home/user1/.ssh in remote machine.

now i try to login using
# ssh [email protected] where x.x.x.x is the IP add of the remote box.
the reply is
permission denied : public key
Can anyone guide me ????
Old 05-04-2005, 02:52 AM   #2
Registered: Mar 2004
Location: Tampere, Finland
Distribution: Debian, Familiar, OS X
Posts: 145

Rep: Reputation: 16
(copied from security forum, ssh login attempts thread)

put your private key into the remote system in a file called authorized_keys.

1) Check if you have a .ssh directory
ssh [email protected] 'ls -l .ssh'

2) If not:
ssh [email protected] 'mkdir .ssh'

3) Copy your public key
scp $HOME/.ssh/ [email protected]:.ssh/authorized_keys

NOTE: if the .ssh directory and the authorized_keys file already exist and the remote system / account are shared or you access [email protected] from more than one machine then do the following:

scp $HOME/.ssh/ [email protected]:.


ssh [email protected] 'cat >> .ssh/authoized_keys' to append to rather than overwrite the authorized_keys file.

thatīs what i used. also the authorized_keys-file is configured in sshd config file. adjust your config accordingly.


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
ssh public key authentication teacup Linux - Networking 4 11-27-2011 11:27 PM
DISCUSSION: Public key authentication with ssh david_ross LinuxAnswers Discussion 31 02-02-2011 08:13 AM
ssh public key authentication problem flgal3 Linux - Software 21 02-06-2009 11:15 AM
SSH - Problem with Public Key Authentication HaPagan Linux - Security 5 11-28-2005 11:27 PM
Newbie: ssh without public key still works? aleet2600 Linux - Security 5 04-15-2004 03:10 PM > Forums > Linux Forums > Linux - Networking

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