Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
f2b95274
Commit
f2b95274
authored
7 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
getfacl and setfacl for a working ssh connect
parent
b8bedfe6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/Sdi/gettingStarted.xml
+66
-0
66 additions, 0 deletions
Doc/Sdi/gettingStarted.xml
with
66 additions
and
0 deletions
Doc/Sdi/gettingStarted.xml
+
66
−
0
View file @
f2b95274
...
...
@@ -17,6 +17,72 @@
access to two virtual machines to mimic client provider and replication
scenarios.
</para>
<para>
If you do not yet have a public/private
<acronym>
ssh
</acronym>
key
pair the
<command>
ssh-keygen
</command>
command is your friend. It allows
for generating a pair inside your
<filename>
~/.ssh
</filename>
subdirectory. Working on a network drive your first problem may be
inappropriate file permissions of and inside your ~/.ssh directory:
</para>
<screen>
mistudent@w10m:~/.ssh$ pwd
/stud/mistudent/.ssh
mistudent@w10m:~/.ssh$ ls -al
total 24
drwxrwx---+ 2 mistudent mi 0 Okt 17 17:45 .
drwx------+ 32 mistudent mi 0 Okt 17 17:44 ..
-rwxrwx---+ 1 mistudent mi 396 Okt 17 17:45 authorized_keys
-rwxrwx---+ 1 mistudent mi 1675 Okt 17 17:38 id_rsa
-rwxrwx---+ 1 mistudent mi 396 Okt 17 17:38 id_rsa.pub
</screen>
<para>
The permissions of the directory itself and the files within are too
open . The
<command>
sshd
</command>
daemon process will deny remote access
due to possible security implications. Unfortunately the standard
<command>
chmod
</command>
command from UNIX does not help on modern
<abbrev>
cifs
</abbrev>
based network file systems using extended ACLs. We
may ask
<command>
getfacl
</command>
for details:
</para>
<screen>
mistudent@w10m:~/.ssh$ getfacl authorized_keys
# file: authorized_keys
# owner: mistudent
# group: mi
user::rwx
user:mistudent:rwx
group::---
group:users:---
mask::rwx
other::---
</screen>
<para>
The counterpart
<command>
setfacl
</command>
allows for revoking
permissions
<abbrev>
e.g.
</abbrev>
on
<filename>
authorized_keys
</filename>
:
</para>
<screen>
mistudent@w10m:~/.ssh$ setfacl -m user:mistudent:--- authorized_keys
mistudent@w10m:~/.ssh$ setfacl -m user::rw- authorized_keys
mistudent@w10m:~/.ssh$ getfacl authorized_keys
# file: authorized_keys
# owner: mistudent
# group: mi
user::rw-
user:mistudent:---
group::---
group:users:---
mask::---
other::---
mistudent@w10m:~/ssh$ ls -al authorized_keys
-rw-------+ 1 mistudent mi 396 Okt 17 17:45 authorized_keys
</screen>
<para>
Addressing each file and the directory itself in a similar fashion
leads to:
</para>
<screen>
mistudent@w10m:~/.ssh$ ls -al
total 32
drwx------+ 2 mistudent mi 0 Okt 17 17:44 .
drwx------+ 32 mistudent mi 0 Okt 17 17:44 ..
-rw-------+ 1 mistudent mi 1132 Okt 17 17:40 authorized_keys
-rw-------+ 1 mistudent mi 1679 Okt 11 14:46 id_rsa
-rw-r--r--+ 1 mistudent mi 396 Okt 11 14:46 id_rsa.pub
-rw-------+ 1 mistudent mi 442 Okt 11 14:49 known_hosts
</screen>
<para>
Access to these virtual machines is initially being controlled by
password. A client will allow you to connect:
</para>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment