Reputation: 88
I ssh into a linux machine using nets namespace (command below)
ip netns exec NAME_SPACE ssh [email protected]
From there I want to execute some command(say "ifconfig") in default name space from this.
Upvotes: 1
Views: 1722
Reputation: 5221
If you know that a process is running in the default network namespace (typically process number 1), you can use tools like nsenter to run a command in the same network namespace (-n option):
-n
# nsenter -t 1 -n ifconfig
Upvotes: 3