Skip to main content
please keep questions on topic
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

This is my first time to setSetting up a CentOS 7 cloud server for a client, and have run into an issue with setting it to use a public RSA key instead of a password for one of a handful of SFTP users. I have years of experience with developing complex database-driven sites on Windows-based servers, but this is the first time I've set up a Unix server for more than simple web hosting... So, please treat me like a novice that knows little more than how to access a server using Terminal.

Found an online guide on setting up keys at:

https://debian-administration.org/article/530/SSH_with_authentication_key_instead_of_password

The client supplied a public key file, which I copied to the server using the "ssh-copy-id" command. All good according to the responses I got.

I then locked the account using the "passwd -l" command. Reset the server and checked, and the system confirms that the password is locked:

testuser1 LK 2018-09-17 0 99999 7 -1 (Password locked.)

However, I can still log in using a password using that account on computers that do not have the private key installed.

So, I did more research, and found another tutorial that says you can force the use of RSA keys by setting PasswordAuthentication to no in the etc/ssh/sshd_config file, which raises a concern as other users do not use RSA keys for their login.

Did I do something wrong, or is there something else I can do to disable passwords for this single account? Is there a way to allow some users to use passwords while allowing others to use a RSA key?

All help offered is most appreciated!

This is my first time to set up a CentOS 7 cloud server for a client, and have run into an issue with setting it to use a public RSA key instead of a password for one of a handful of SFTP users. I have years of experience with developing complex database-driven sites on Windows-based servers, but this is the first time I've set up a Unix server for more than simple web hosting... So, please treat me like a novice that knows little more than how to access a server using Terminal.

Found an online guide on setting up keys at:

https://debian-administration.org/article/530/SSH_with_authentication_key_instead_of_password

The client supplied a public key file, which I copied to the server using the "ssh-copy-id" command. All good according to the responses I got.

I then locked the account using the "passwd -l" command. Reset the server and checked, and the system confirms that the password is locked:

testuser1 LK 2018-09-17 0 99999 7 -1 (Password locked.)

However, I can still log in using a password using that account on computers that do not have the private key installed.

So, I did more research, and found another tutorial that says you can force the use of RSA keys by setting PasswordAuthentication to no in the etc/ssh/sshd_config file, which raises a concern as other users do not use RSA keys for their login.

Did I do something wrong, or is there something else I can do to disable passwords for this single account? Is there a way to allow some users to use passwords while allowing others to use a RSA key?

All help offered is most appreciated!

Setting up a CentOS 7 cloud server for a client, and have run into an issue with setting it to use a public RSA key instead of a password for one of a handful of SFTP users.

Found an online guide on setting up keys at:

https://debian-administration.org/article/530/SSH_with_authentication_key_instead_of_password

The client supplied a public key file, which I copied to the server using the "ssh-copy-id" command. All good according to the responses I got.

I then locked the account using the "passwd -l" command. Reset the server and checked, and the system confirms that the password is locked:

testuser1 LK 2018-09-17 0 99999 7 -1 (Password locked.)

However, I can still log in using a password using that account on computers that do not have the private key installed.

So, I did more research, and found another tutorial that says you can force the use of RSA keys by setting PasswordAuthentication to no in the etc/ssh/sshd_config file, which raises a concern as other users do not use RSA keys for their login.

Did I do something wrong, or is there something else I can do to disable passwords for this single account? Is there a way to allow some users to use passwords while allowing others to use a RSA key?

Source Link

Locking account password and instead use RSA key

This is my first time to set up a CentOS 7 cloud server for a client, and have run into an issue with setting it to use a public RSA key instead of a password for one of a handful of SFTP users. I have years of experience with developing complex database-driven sites on Windows-based servers, but this is the first time I've set up a Unix server for more than simple web hosting... So, please treat me like a novice that knows little more than how to access a server using Terminal.

Found an online guide on setting up keys at:

https://debian-administration.org/article/530/SSH_with_authentication_key_instead_of_password

The client supplied a public key file, which I copied to the server using the "ssh-copy-id" command. All good according to the responses I got.

I then locked the account using the "passwd -l" command. Reset the server and checked, and the system confirms that the password is locked:

testuser1 LK 2018-09-17 0 99999 7 -1 (Password locked.)

However, I can still log in using a password using that account on computers that do not have the private key installed.

So, I did more research, and found another tutorial that says you can force the use of RSA keys by setting PasswordAuthentication to no in the etc/ssh/sshd_config file, which raises a concern as other users do not use RSA keys for their login.

Did I do something wrong, or is there something else I can do to disable passwords for this single account? Is there a way to allow some users to use passwords while allowing others to use a RSA key?

All help offered is most appreciated!