Add some port validation to the remote command

also `return` is unneeded