If you’re sitting down and somebody greets you with a handshake, what is the proper etiquette? Do you stand up, or remain seated?

Also, if you are sitting and meeting with somebody, then need to shake their hand before leaving, do you do so while sitting down, or wait until you get up?

Are both-people-seated handshakes ok? When is it appropriate for there to be a handshake exchange with one person seated and the other not?