By default SSHD in linux instances in AWS are started with password authentication set to NO. For good resaons. Clear text password authentication is NOT as secured.
However for development instances or sandboxes, it might provide a "convenience" that may be worth.
To enable password authentication to AWS linux instances, modify parameter PasswordAuthentication parameter in file sshd_config and then restart the sshd process.
For example...
1 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
4 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
In the VI editor...
2 | PasswordAuthentication yes |
Now restart SSHD process.
02 | sshd re- exec requires execution with an absolute path |
03 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
06 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
08 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
09 | $ service /usr/sbin/sshd restart |
10 | /usr/sbin/sshd: unrecognized service |
11 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
15 | root@domU-12-31-39-00-7C-94:[/etc/ ssh ] |
Now SSHD process is started with password authentication enabled. If we remove the key from the putty profle and open a telnet connection, we'll be prompted for userid and password.
We should be able use a valid linux user with password to login.
2 | oracle@ec2-23-22-205-159.compute-1.amazonaws.com's password: |
3 | oracle@domU-12-31-39-00-7C-94:[/home/oracle] |
5 | oracle@domU-12-31-39-00-7C-94:[/home/oracle] |
7 | oracle@domU-12-31-39-00-7C-94:[/home/oracle] |
That's it. Be careful when using this technique.
No comments:
Post a Comment