Pregunta

Estoy ejecutando un servidor Leopard de Mac OS X y creé un nuevo usuario sin designar un directorio de inicio para ese usuario. ¿Es posible que ese usuario se autentique usando una clave pública?

Sé que cuando un usuario tiene un directorio de inicio, entra en ~/.ssh/authorized_keys

No quiero crear un directorio de inicio para este usuario porque entiendo que les permitiría iniciar sesión si se les da acceso físico.

ACTUALIZACIÓN: necesito permitir que este usuario solo haga una conexión FTP segura. Establecer el Shell de inicio de sesión en /bin/false/ también evitará que se conecten de forma remota.

¿Fue útil?

Solución

Debe editar /etc/ssh/sshd_config o dónde está ubicado en su máquina y cambiar la configuración de AuthorizedKeysFile.

Los documentos dicen:

 AuthorizedKeysFile
         Specifies the file that contains the public keys that can be used
         for user authentication.  AuthorizedKeysFile may contain tokens of
         the form %T which are substituted during connection setup.  The fol-
         lowing tokens are defined: %% is replaced by a literal '%', %h is
         replaced by the home directory of the user being authenticated, and
         %u is replaced by the username of that user.  After expansion,
         AuthorizedKeysFile is taken to be an absolute path or one relative
         to the user's home directory.  The default is
         ``.ssh/authorized_keys''.

¿Pero por qué tiene usuarios (que pueden iniciar sesión) sin un hogar?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top