Back to Contents Page

SSH Commands

Dell™ PowerConnect™ 3324/3348 Switch CLI Guide

  ip ssh port

  ip ssh server

  crypto key generate dsa

  crypto key generate rsa

  ip ssh pubkey-auth

  crypto key pubkey-chain ssh

  user-key

  key-string

  show ip ssh

  show crypto key mypubkey

  show crypto key pubkey-chain ssh



ip ssh port

Use the ip http port global configuration command to specify the TCP port to be used by the SSH server. To use the default port, use the no form of this command.

Syntax

ip ssh port port-number

no ip ssh port

Default Configuration

The default value is 22.

Command Mode

Global Configuration Mode

User Guidelines

There are no user guidelines for this command.

Examples

The following example specifies the port to be used by the SSH server.

Console (config)# ip ssh port 8080


ip ssh server

Use the ip ssh server global configuration command to enable the device to be configured from SSH. To disable this function use the no form of this command.

Syntax

ip ssh server

no ip ssh server

Default Configuration

This default is enabled to be configured from SSH.

Command Mode

Global Configuration Mode

User Guidelines

If encryption keys are not generated, the SSH server is in standby until the keys are generated. To generate SSH server keys, use the commands crypto key generate rsa, and crypto key generate dsa.

Examples

The following example enables the device to be configured from a SSH server.

Console (config)# ip ssh server


crypto key generate dsa

Use the ip ssh server global configuration command to generate DSA key pairs.

Syntax

crypto key generate dsa

Default Configuration

DSA key pairs do not exist.

Command Mode

Global Configuration Mode

User Guidelines

DSA keys are generated in pairs, one public DSA key and one private DSA key. If the device already has DSA keys, a warning and prompt to replace the existing keys with new keys is displayed.

This command is not saved in the startup configuration, however, the keys generated by this command are saved in the running configuration (which is never displayed to the user or backed up to another device).

Examples

The following example generates DSA key pairs.

Console (config)# crypto key generate dsa

This may take several minutes depending on the length.

Console (config)#


crypto key generate rsa

Use the crypto key generate rsa global configuration command to generate RSA key pairs.

Syntax

crypto key generate rsa

Default Configuration

RSA key pairs do not exist.

Command Mode

Global Configuration Mode

User Guidelines

DSA keys are generated in pairs, one public DSA key and one private DSA key. If the device already has DSA keys, a warning and prompt to replace the existing keys with new keys is displayed.

This command is not saved in the startup configuration, however, the keys generated by this command are saved in the running configuration (which is never displayed to the user or backed up to another device).

Examples

The following example generates RSA key pairs.

Console (config)# crypto key generate rsa

This may take several minutes depending on the length.

Console (config)#


ip ssh pubkey-auth

Use the ip ssh pubkey-auth global configuration command to enable public key authentication for incoming SSH sessions. To disable this function, use the no form of this command.

Syntax

ip ssh pubkey-auth

no ip ssh pubkey-auth

Default Configuration

The function is disabled.

Command Mode

Global Configuration Mode

User Guidelines

AAA authentication is independent.

Examples

The following example enables public key authentication for incoming SSH sessions.

Console (config)# ip ssh pubkey-auth


crypto key pubkey-chain ssh

Use the crypto key pubkey-chain ssh global configuration command to enter SSH Public Key-Chain Configuration Mode. The mode is used to manually specify other device public keys such as SSH client public keys.

Syntax

crypto key pubkey-chain ssh

Default Configuration

By default there are no keys.

Command Mode

Global Configuration Mode

User Guidelines

There are no user guidelines for this command.

Examples

The following example enters the SSH Public Key-Chain Configuration Mode.

Console(config)# crypto key pubkey-chain ssh

Console(config-pubkey-chain)#


user-key

Use the user-key SSH public key-chain configuration command to specify which SSH public key is manually configured and enters the SSH public key-string configuration command. To remove a SSH public key, use the no form of this command.

Syntax

user-key username

no user-key username

Default Configuration

By default there are no keys.

Command Mode

SSH Public Key-Chain Configuration Mode

User Guidelines

Follow this command with the key-string command to specify the key.

Examples

The following example enables a SSH public key to be manually configured for the SSH public-key chain.

Console(config)# crypto key pubkey-chain ssh

Console(config-pubkey-chain)# user-key bob

Console(config-pubkey-key)#


key-string

Use the key-string SSH public key-string configuration command to manually specify a SSH public key.

Syntax

key-string {rsa | dss}

Default Configuration

By default the keys do not exist.

Command Mode

SSH Public Key-string configuration

User Guidelines

Use this command to specify which SSH public key to manually configure next.

UU-encoded DER format is the same format in authorized_keys file used by OpenSSH.

To complete the command, enter the row with no characters.

Examples

The following example enters public key strings for SSH public key clients.

Console(config)# crypto key pubkey-chain ssh

Console(config-pubkey-chain)# user-key bob

Console(config-pubkey-key)# key-string rsa

AAAAB3NzaC1yc2EAAAADAQABAAABAQCvTnRwPWl

Al4kpqIw9GBRonZQZxjHKcqKL6rMlQ+

ZNXfZSkvHG+QusIZ/76ILmFT34v7u7ChFAE+

Vu4GRfpSwoQUvV35LqJJk67IOU/zfwOl1g

kTwml75QR9gHujS6KwGN2QWXgh3ub8gDjTSq

muSn/Wd05iDX2IExQWu08licglk02LYciz

+Z4TrEU/9FJxwPiVQOjc+KBXuR0juNg5nFYsY

0ZCk0N/W9a/tnkm1shRE7Di71+w3fNiOA

6w9o44t6+AINEICBCCA4YcF6zMzaT1wefWwX6f+

Rmt5nhhqdAtN/4oJfce166DqVX1gWmN

zNR4DYDvSzg0lDnwCAC8Qh

Fingerprint: a4:16:46:23:5a:8d:1d:b5:37:59:eb:44:13:b9:33:e9


show ip ssh

Use the show ip ssh privileged EXEC command to display the SSH server configuration.

Syntax

show ip ssh

Default Configuration

This command has no default configuration.

Command Mode

Privileged EXEC Mode

User Guidelines

There are no user guidelines for this command.

Examples

The following example displays the SSH server configuration.

Console# show ip ssh

SSH server enabled. Port: 22

RSA key was generated.

DSA key was generated.

SSH Public Key Authentication is enabled.

Active incoming sessions:

IP address SSH username Version Cipher Auth Code

---------- ------------ ------- ------ ---------

172.16.0.1 John Brown 1.5 3DES HMAC-SH1


show crypto key mypubkey

Use the show crypto key mypubkey privileged EXEC command to display the SSH public keys on the device.

Syntax

show crypto key mypubkey [rsa | dsa]

Default Configuration

This command has no default configuration.

Command Mode

Privileged EXEC Mode

User Guidelines

There are no user guidelines for this command.

Examples

The following example displays the SSH public keys on the device.

Console# show crypto key mypubkey rsa

RSA key data:

005C300D 06092A86 4886F70D 01010105 00034B00 30480241 00C5E23B 55D6AB22

04AEF1BA A54028A6 9ACC01C5 129D99E4 64CAB820 847EDAD9 DF0B4E4C 73A05DD2

BD62A8A9 FA603DD2 E2A8A6F8 98F76E28 D58AD221 B583D7A4 71020301 87685768

Fingerprint(Hex): 77:C7:19:85:98:19:27:96:C9:CC:83:C5:78:89:F8:86

Fingerprint(Bubble Babble): yteriuwt jgkljhglk yewiury hdskjfryt gfhkjglk


show crypto key pubkey-chain ssh

Use the show crypto key pubkey-chain ssh privileged EXEC command to display SSH public keys stored on the device.

Syntax

show crypto key pubkey-chain ssh [username username] [fingerprint bubble-babble | hex]

Default Configuration

This command has no default configuration.

Command Mode

Privileged EXEC Mode

User Guidelines

There are no user guidelines for this command.

Examples

The following example displays all SSH public keys stored on the device.

Console# show crypto key pubkey-chain ssh

Username Fingerprint

-------- ----------------------------------------------------

bob 9A:CC:01:C5:78:39:27:86:79:CC:23:C5:98:59:F1:86

john 98:F7:6E:28:F2:79:87:C8:18:F8:88:CC:F8:89:87:C8

The following example displays the SSH public key called bob.

Console# show crypto key pubkey-chain ssh bob

Username: bob

Key: 005C300D 06092A86 4886F70D 01010105 00034B00 30480241 00C5E23B 55D6AB22 04AEF1BA A54028A6 9ACC01C5 129D99E4

Fingerprint: 9A:CC:01:C5:78:39:27:86:79:CC:23:C5:98:59:F1:86


Back to Contents Page