Results 1 to 6 of 6
Thread: Please help with this ssh error!
-
01-03-2008, 12:05 AM #1Web Hosting Guru
- Join Date
- Jan 2005
- Posts
- 268
Please help with this ssh error!
Hi guys,
I was trying to generate ssh key for my server and get this message below
Code:[andyj@server ~]$ ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/home/andyj/.ssh/id_dsa): [Enter] Enter passphrase (empty for no passphrase): [Enter] Enter same passphrase again: [Enter] open /home/andyj/.ssh/id_dsa failed: Permission denied. Saving the key failed: /home/andyj/.ssh/id_dsa.
How do i allow 'andyj' user to have permission to do this ? Note, I can do this with 'root' just fine. I'm using CentOS 5. Thanks
-
01-03-2008, 12:19 AM #2Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Your user doesn't have permission to write to that directory.
Code:ls -la /home/andyj/.ssh
Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
01-03-2008, 12:34 AM #3Web Hosting Guru
- Join Date
- Jan 2005
- Posts
- 268
-
01-03-2008, 12:44 AM #4Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Show current ownership and permissions:
Code:ls -la /home/andyj/.ssh
Code:chown andyj:andyj /home/andyj/.ssh
Code:chmod 700 /home/andyj/.ssh
Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
01-03-2008, 12:57 AM #5Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Make sure the following permissions are set.
file authorized_keys 600
folder .ssh 700
Home Directory 711
Keys (id_dsa,id_rsa) 600
Public Keys (id_dsa.pub,id_rsa.pub) 644David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
01-03-2008, 01:16 AM #6Web Hosting Guru
- Join Date
- Jan 2005
- Posts
- 268