Hello.
Is it possible to connect via SSH to one user (for example, administrator) with a password, and another (for example, with a web programmer) using a key without having to enter a password?
If yes, tell me where to dig.
Thank.
Hello.
Is it possible to connect via SSH to one user (for example, administrator) with a password, and another (for example, with a web programmer) using a key without having to enter a password?
If yes, tell me where to dig.
Thank.
Configure key authorization (full), the web programmer’s public key, put in authorized_keys, and don’t put the administrator’s public key in authorized_keys. The point is that the default is first checking the key, if it is not correct or absent, then the password is asked.
And you can still be perverted and hang two ssh daemons on different ports, one of the demons set up for authorization by key and the other by password.
Create a config file in the .ssh directory and add the keys you need.
config In it:
Host dv
HostName example.com
User domainuser
You can see it here: http://kb.mediatemple.net/questions/1625/Using+an+SSH+Config+File
Source: https://ru.stackoverflow.com/questions/344461/
All Articles