Use a full path to the config file: /etc/ssh/sshd_config.
You need to login as root to do this. It isn't a good idea to allow root logins, especially if you use password authentication. I imagine that is what you are trying to fix.
Also consider:
UsePam yes
PermitRootLogin no
PubkeyAuthentication yes
ChallengeResponseAuthentication no
See the comments for "UsePam" in the /etc/ssh/sshd_config file. These settings only allow pubkey authentication and use PAM for session control. Another entry to consider is "AllowUsers" to only allow logins from certain users. The entries can also use the "user@host" form, which allows logins for (local)user @ (remote)host. Further info is in the ssh_config manpage.
You may need another sed command in the sed line. You can add sed commands in a oneliner by separating them with ";" or using the -e option before each command.
Last edited by jschiwal; 10-28-2008 at 01:52 PM.
|