Add some port validation to the remote command

`return` is unneeded