SSHD Een user password, rest keys

Pagina: 1
Acties:

  • icyx
  • Registratie: Januari 2007
  • Niet online

icyx

chown -R us ./base

Topicstarter
Hallo,

Omdat ik door omstandigheden op een lokatie alleen via een standaard 'ssh password' kan inloggen op mijn server, wil ik het volgende bereiken:

Users A, B, C, .. Z moeten zich authenticeren via een keypair met passphrase.
User X mag zich als enige authenticeren via een wachtwoord.

User X heeft dus geen mogelijkheid een keypair te gebruiken. De reden dat ik in principe keypairs wil is natuurlijk veiligheid. Omdat het bij user X niet kan, zorg ik er ook voor dat hij in een chroot omgeving beland. Dat is allemaal geen probleem.
Echter voor het configureren van de SSH server is het nog niet zo makkelijk. Ik moet als het ware een PermitUserXLogin optie hebben.
Heeft iemand een idee of ik dit resultaat kan bereiken? Voorlopig kunnen de manpages me niet echt helpen, en google geeft practisch alleen hits voor keypair logins (meestal zelfs passwordless...)

When you think you’ve succeeded / but something’s missing / means you have been defeated / by greed, your weakness.


  • BarthezZ
  • Registratie: Juli 2004
  • Niet online

BarthezZ

anti voetbal en slechte djs!

Als je nou gewoon de permissies op de keyfile (~/.ssh/authorized_keys) uit mn hoofd zo zet dat die user geen mogelijkheid heeft tot het toevoegen van keys?

  • vanaalten
  • Registratie: September 2002
  • Laatst online: 10:43
Ik heb er geen ervaring mee, maar uit de man page van sshd_config:
Match Introduces a conditional block. If all of the criteria on the
Match line are satisfied, the keywords on the following lines
override those set in the global section of the config file, un-
til either another Match line or the end of the file.

The arguments to Match are one or more criteria-pattern pairs.
The available criteria are User, Group, Host, and Address. The
match patterns may consist of single entries or comma-separated
lists and may use the wildcard and negation operators described
in the PATTERNS section of ssh_config(5).

The patterns in an Address criteria may additionally contain ad-
dresses to match in CIDR address/masklen format, e.g.
``192.0.2.0/24'' or ``3ffe:ffff::/32''. Note that the mask
length provided must be consistent with the address - it is an
error to specify a mask length that is too long for the address
or one with bits set in this host portion of the address. For
example, ``192.0.2.0/33'' and ``192.0.2.0/8'' respectively.

Only a subset of keywords may be used on the lines following a
Match keyword. Available keywords are AllowTcpForwarding,
Banner, ChrootDirectory, ForceCommand, GatewayPorts,
GSSAPIAuthentication, HostbasedAuthentication,
KbdInteractiveAuthentication, KerberosAuthentication,
MaxAuthTries, MaxSessions, PasswordAuthentication,
PermitEmptyPasswords, PermitOpen, PermitRootLogin,
RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset,
X11Forwarding, and X11UseLocalHost.
... misschien dat je iets kan doen van matchen op username, daarna indien match passwordauth toestaan?

  • icyx
  • Registratie: Januari 2007
  • Niet online

icyx

chown -R us ./base

Topicstarter
vanaalten schreef op woensdag 22 oktober 2008 @ 17:14:
Ik heb er geen ervaring mee, maar uit de man page van sshd_config:

[...]

... misschien dat je iets kan doen van matchen op username, daarna indien match passwordauth toestaan?
Hier zal ik binnenkort eens naar gaan kijken, bedankt :)

When you think you’ve succeeded / but something’s missing / means you have been defeated / by greed, your weakness.