When Peter was told what what was going to happen to Jesus, he rebuked Jesus. As Allen and Williamson put it, he turned from being the rock to being a stumbling block. (Preaching the Gospel without Blaming the Jews)
When the devil showed Jesus all the kingdoms of the world and promised them to him in exchange for being worshiped, Jesus told him to go away.
When Peter pleaded with Jesus to skip the suffering, Jesus called him Satan and said, "Get behind me." Boring and Craddock suggest that Jesus was not telling him to go away. Rather, Jesus was telling Paul, "Get in line behind me. You're next." The People's New Testament Commentary