su {user} not working inside the ssh shell on the server

I am trying to connect to the server as root using ssh command in Ubuntu bash. I use ssh -p port root@ip to connect to the server and the config of ssh is a password-less connection. After connecting to the server, I run the following command:

su hadoop 

It shows hadoop@server:/root$ and after 5 secs shows root@server ~ # again and every button I press on the keyboard is not typed in the bash but after pressing enter I find out that the command is done.

I have checked that hadoop user is started with bash. By the way, I have Hadoop and Hbase and Zookeeper started on this very server.
Please help me to fix it.