1 |
On 02/07/2013 08:33, Grant wrote: |
2 |
>>> My backup user needs a shell on the backup server in order to execute |
3 |
>>> rsync and needs to be included in /etc/ssh/sshd_config AllowUsers in |
4 |
>>> order to SSH in. My authorized_keys file is locked-down. The second |
5 |
>>> field for the user in /etc/shadow is an exclamation point which I |
6 |
>>> think means the user can not log in with a password. Should I take |
7 |
>>> any additional steps to prevent that user from logging in and not |
8 |
>>> being subject to the authorized_keys restrictions? |
9 |
>> |
10 |
>> What about "PasswordAuthentication no"? |
11 |
> |
12 |
> Can that be set for a single user? I have a normal user who needs to |
13 |
> log in via SSH with a password and a backup user who only needs to run |
14 |
> rsync via SSH keys. If not, does the exclamation point in /etc/shadow |
15 |
> prevent the user from logging in without the SSH key? |
16 |
|
17 |
Depends. |
18 |
|
19 |
The user doesn't have a Unix password, so if the system prompts for one |
20 |
it cannot succeed and the login fails. |
21 |
|
22 |
But sshd has other implementations for authentication to, not just |
23 |
classic Unix. If it uses PAM, then PAM could in theory do anything, even |
24 |
using AD to authenticate with a password. |
25 |
|
26 |
So if your sshd config uses Unix passwords and keys ONLY (this is the |
27 |
norm), then what you describe above does what you want. To be sure, you |
28 |
need to audit sshd_config and your pam setup |
29 |
|
30 |
-- |
31 |
Alan McKinnon |
32 |
alan.mckinnon@×××××.com |