Monday, November 25, 2013

How to Manipulate ssh via the command line

Manipulating the SSH service via the c.l.i.

1. Verify that the firewall is enabled

# esxcli network firewall get

2. Verify if ssh is disabled (default) or enabled.

# esxcli network firewall ruleset list --ruleset-id sshServer

3. Enable ssh if needed

# esxcli network firewall ruleset set --ruleset-id sshServer --enabled true

4. Verify who can ssh into your esxi server

# esxcli network firewall ruleset allowedip list --ruleset-id sshServer

5. Change it so only one ip can be used.

# esxcli network firewall ruleset set --ruleset-id sshServer --allowed-all false
# esxcli network firewall ruleset alloweid add --ruleset-id sshServer --ip-address 10.1.1.1

6 Verify the changes

# esxcli network firewall ruleset allowedip list --ruleset-id sshServer

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.