With HDP 2.5+, the sandbox uses Docker, so you will need to specify port "2222". try the below sample command.
Windows host (will require scp client like cygwin):
scp -P 2222 C:/Users/rnkumashi/Downloads/sample.txt root@localhost:/root
scp -P 2222 /Users/rnkumashi/Downloads/sample.txt root@localhost:/root
Alternatively, you can use the Ambari Files View to upload the file through the UI
As always, if you find this post helpful, don't forget to "accept" the answer.