A robot controller is developed for human-robot handshaking. The focus of the work is to provide realistic experiences for the human participant in haptic interactions with a robot. To achieve this goal, a position-based admittance controller is implemented. By using haptic data as inputs, a Hidden Markov Model-based high-level controller is used to estimate human intentions and modify the reference trajectory accordingly. The overall control framework is implemented onto a robot with validation experiments carried out with human participants.