Why did Jesus rebuke Peter saying he was influenced by Satan?

He then began to teach them that the Son of Man must suffer many things and be rejected by the elders, the chief priests and the teachers of the law, and that he must be killed and after three days rise again. He spoke plainly about this, and Peter took him aside and began to rebuke him.

But when Jesus turned and looked at his disciples, he rebuked Peter. “Get behind me, Satan!” he said. “You do not have in mind the concerns of God, but merely human concerns.” Mark 8:31-33

            Nothing could get in the way of Jesus’ journey to the cross.  Peter had no idea he was acting as an agent of Satan, trying to stop Jesus from dying for the sins of all mankind.  Peter wanted to protect a friend (and he would later pull out a sword to defend Jesus against arrest).  But, Jesus had a more important job as savior.  Satan sneakily speaks “good things” to deter us from doing the best thing.