docs/02_cleos/03_command-reference/net/disconnect.md
cleos net disconnect [OPTIONS] host
Where:
Note: The arguments and options enclosed in square brackets are optional.
Close an existing connection to a specified peer. A node operator can use this command to instruct a node to disconnect from another peer without restarting the node.
The following information shows the different positionals and options you can use with the cleos net disconnect command:
host TEXT REQUIRED - The hostname:port to disconnect from-h,--help - Print this help message and exitMake sure you meet the following requirements:
cleos.
[[info | Note]]
| cleos is bundled with the EOSIO software. Installing EOSIO will also install the cleos and keosd command line tools.net_api_plugin loaded.The following examples demonstrate how to use the cleos net disconnect command:
http://127.0.0.1:8888) to disconnect from peer node listening at p2p address localhost:9002:cleos net disconnect localhost:9002
Output:
"connection removed"
http://127.0.0.1:8001 to disconnect from peer node listening at p2p address localhost:9002:cleos -u http://127.0.0.1:8001 net disconnect localhost:9002
Output:
"connection removed"
Note: If any of the above commands are re-executed, cleos returns the following message as expected:
"no known connection for host"