
  My question is how to configure the pins so that: 1) Pin is high, led wont burn. 2) Pin is low, led will burn.


If you configure a pin as output, setting it to low will sink current and setting it to low will source current. As long as the Vcc supplying your LEDs is the same as the controller Vcc, you circuit should work as expected.

The atmega32 can safely sink/source about 20mA per IO. However, there are limitations regarding the total maximum per port and for all ports combined. It depends on the package type. For PDIP its about 100mA max per port and 200mA max total. Take a look at the "DC characteristics" section in the data sheet.

So using 4 LEDs as illustrated should work fine (assuming about 20mA per LED).

How to drain power with pins for led matrix on atmega32 instead of using a led driver
When I'm checking my log, I found like 15k events of " PAM service(sshd) ignoring max retries; 6 > 3 "

I know this might be normal, and considered as Brute-Force attack, but can it be classified as DoS attempt?

Sample of the log:

| 8864611 | eros     | 2014-08-11 18:18:38 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8865352 | eros     | 2014-08-11 18:46:59 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8865364 | eros     | 2014-08-11 18:47:13 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8865693 | eros     | 2014-08-11 19:00:39 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8865700 | eros     | 2014-08-11 19:01:55 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8865706 | eros     | 2014-08-11 19:02:11 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8865716 | eros     | 2014-08-11 19:02:28 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8866965 | eros     | 2014-08-11 19:59:47 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8867068 | eros     | 2014-08-11 20:00:18 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8896353 | eros     | 2014-08-12 17:31:33 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8896363 | eros     | 2014-08-12 17:31:49 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8901992 | eros     | 2014-08-12 21:40:48 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8902001 | eros     | 2014-08-12 21:41:03 |  PAM service(sshd) ignoring max retries; 6 &gt; 3 |
| 8902007 | eros     | 2014-08-12 21:41:18 |  PAM service(sshd) ignoring max retries; 6 &gt; 3

