Skip to main content
Fixed location for AuthorizedKeysFile directive to /etc/ssh/config instead of ~/.ssh/config
Source Link
Totor
  • 21.2k
  • 22
  • 85
  • 114

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keysauthorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was createdcreate a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keysauthorized_keys file in there. ThenThen changed the AuthorizedKeysFile directive in /etc/ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

AuthorizedKeysFile    /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was created a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keys file in there. Then changed the AuthorizedKeysFile directive in /etc/ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was create a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authorized_keys file in there. Then changed the AuthorizedKeysFile directive in /etc/ssh/config to :

AuthorizedKeysFile    /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Fixed location for AuthorizedKeysFile directive to /etc/ssh/config instead of ~/.ssh/config
Source Link

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was created a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keys file in there. Then changed the AuthorizedKeysFile directive in ~/.etc/ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was created a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keys file in there. Then changed the AuthorizedKeysFile directive in ~/.ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was created a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keys file in there. Then changed the AuthorizedKeysFile directive in /etc/ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Added details on where to put the autorized_keys file, as well has how to format the line in the sshd_config file to allow for specific users to have different allowable keys
Source Link

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was created a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keys file in there. Then changed the AuthorizedKeysFile directive in ~/.ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

What I ended up doing was created a /etc/ssh/username folder, owned by username, with the correct permissions, and placed the authroized_keys file in there. Then changed the AuthorizedKeysFile directive in ~/.ssh/config. to :

AuthorizedKeysFile /etc/ssh/%u/authorized_keys

This allows multiple users to have this ssh access without compromising permissions.

added 2 characters in body
Source Link
Mat
  • 54.9k
  • 11
  • 164
  • 143
Loading
Source Link
cee
  • 679
  • 5
  • 2
Loading