LinuxQuestions.org
Visit Jeremy's Blog.
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 01-21-2016, 11:13 AM   #1
iFunction
Member
 
Registered: Nov 2015
Posts: 232

Rep: Reputation: Disabled
.ssh file is root on one raspberry pi and pi on another


What should the permissions be for .ssh folder in the home folder please, on one raspberry pi it is 'root', and the other it is 'pi'

how can i change this:
Code:
drwx------ 3 root    root 4096 Jan 21  14:18 .ssh
to
Code:
drwx------ 3 pi      pi   4096 Jan 21  14:18 .ssh
like it is on the other one please?
 
Old 01-21-2016, 01:36 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,053
Blog Entries: 14

Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
The .ssh directory should be owned by the user that is running ssh. That is to say if you have a root user and a pi user and were using ssh to or from either there should a .ssh under each user's home that should only be accessible by that user.
 
1 members found this post helpful.
Old 01-21-2016, 01:36 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,552

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
The user's .ssh directory should belong to the user with "700" permissions. Root has it's own .ssh directory, located in root's home. On the system where "pi's" .ssh directory belongs to root, run:
Code:
sudo chown -R pi:pi .ssh

Last edited by suicidaleggroll; 01-21-2016 at 01:37 PM.
 
1 members found this post helpful.
Old 01-22-2016, 04:58 AM   #4
iFunction
Member
 
Registered: Nov 2015
Posts: 232

Original Poster
Rep: Reputation: Disabled
Thank you both of you, that is very clear.
 
  


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
Can't ssh from one raspberry pi to another iFunction Linux - Newbie 3 01-22-2016 06:29 AM
SSH problem over wifi with raspberry pi iFunction Linux - Newbie 3 01-12-2016 10:15 AM
LXer: SSH into your Christmas tree with Raspberry Pi LXer Syndicated Linux News 0 12-11-2015 01:43 PM
File '/usr/bin/ssh' is owned by root and has written permissions to anyone. Babelduo Linux - Security 10 06-16-2013 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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