s3:lib/netapi: make use of cli_state_remote_name()