LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2011, 11:10 AM   #1
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Rep: Reputation: 16
copy ssh keys to server.


I am unable to copy my ssh keys to a server.
i changed the file permissions of .ssh/authorized_keys to chmod 600

Code:
walt@casper:~$ ssh-copy-id -i ~/.ssh/id_rsa.pub waljoh@myserver
waljoh@myserver's password: 
Permission denied, please try again.
waljoh@myserver's password: 
bash: .ssh/authorized_keys: Permission denied
 
Old 12-06-2011, 11:32 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Try:

Code:
cat ~/.ssh/id_rsa.pub | ssh -l waljoh myserver "cat - >>.ssh/authorized_keys2"
Also log into myserver and run:

Code:
chmod 750 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys2
 
  


Reply


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 demands keys - trying to set up git server sneakyimp Linux - Server 11 06-03-2011 12:10 PM
How to set SSH keys on SSH server mansour Linux - Newbie 27 01-16-2011 12:44 PM
ssh to remote server using keys charan314 Linux - Enterprise 3 10-09-2009 02:44 AM
Logging in to SSH server with Keys SuperDude123 Linux - Server 6 05-05-2009 11:30 PM
Changing server password AFTER setting ssh-auto keys Swakoo Linux - General 1 02-22-2006 05:38 AM


All times are GMT -5. The time now is 09:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration