liunx增加用户key步骤

新加一个test的用户

adduser test


mkdir ~test/.ssh

加key
echo ssh-dss AAAAB3NzaC1kc3MAAACBAPQsT5zT7YemyH74BKnB8aD27QnihOyZRS+XJfml8x4k2aZlhIzvSX7pXdBrDDXNiRBrJhYhIvIdyEgUvOxUfQuhDYOnP1uLgH3JuB6sPO9zdn5Z6ydmKH3KYdcq71oGW0QssmQJC8eDk1b2ufq0fLb3D+NKQQGJtF7FbvaJMpBHAAAAFQCJr7Jc+zjGftf1u7MFPmKgr+kjHQAAAIEAtxe675RUbveyZdvjDl9oq9btt7EuSdfGpP/v4Fe6uxLdXFzpezisvF6XvSzODCntdjDgrBIGnV3jHtOhNxLgy7KRMm8waZHVj1SB/Rqbdz8vrck6VPAM6yGKVGQsaohMtRFHa9L2wkz2pGoA4GL7kpdN1iY3TrR0QvyGkP30juAAAACAf+OaNmvwUgbpQcH27vyAFQjKnceiMaSu2DWwxm7+0KRNnzK73Ba+w4m9LG1yXDtSRA6nqdyHo+w7FyUUcw0ZSQlWr6VJVusPO0vBqzHaxOu1mitlpDUhs0/7A06xVcaPDNlfN8g2N/DtpE1WFd5ZLfyQl6shLlNZpBWXu0ZhtKs= >> ~test/.ssh/authorized_keys

授权
chown test.test~test/.ssh -R


usermod -G wheel test

你可能感兴趣的:(liunx增加用户key步骤)