HP GbE2c HP GbE2c Ethernet Blade Switch for c-Class BladeSystem Application Gu - Page 27

Using SSH and SCP client commands, Logging in to the switch

Page 27 highlights

Using SSH and SCP client commands The following shows the format for using some client commands. The examples below use 205.178.15.157 as the IP address of a sample switch. Logging in to the switch Enter the following command to log in to the switch: ssh @ For example: >> # ssh [email protected] Downloading configuration from the switch using SCP Enter the following command to download the switch configuration using SCP. You will be prompted for a password: scp @:getcfg For example: >> # scp [email protected]:getcfg ad4.cfg The switch prompts you for the scpadmin password. Uploading configuration to the switch using SCP Enter the following command to upload configuration to the switch. You will be prompted for a password. scp @:putcfg For example: >> # scp ad4.cfg [email protected]:putcfg Applying and saving configuration Enter the apply and save commands after the command above (scp ad4.cfg 205.178.15.157:putcfg), or use the following commands. You will be prompted for a password. >> # scp @:putcfg_apply >> # scp @:putcfg_apply_save For example: >> # scp ad4.cfg [email protected]:putcfg_apply >> # scp ad4.cfg [email protected]:putcfg_apply_save Note the following: • The diff command is automatically executed at the end of putcfg to notify the remote client of the difference between the new and the current configurations. • putcfg_apply runs the apply command after the putcfg is done. • putcfg_apply_save saves the new configuration to the flash after putcfg_apply is done. • The putcfg_apply and putcfg_apply_save commands are provided because extra apply and save commands are usually required after a putcfg. Accessing the switch 27

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165

Accessing the switch 27
Using SSH and SCP client commands
The following shows the format for using some client commands. The examples below use 205.178.15.157 as the IP
address of a sample switch.
Logging in to the switch
Enter the following command to log in to the switch:
ssh <
user
>@<
switch IP address
>
For example:
Downloading configuration from the switch using SCP
Enter the following command to download the switch configuration using SCP. You will be prompted for a password:
scp <
user
>@<
switch IP address
>:getcfg <
local filename
>
For example:
>> # scp [email protected]:getcfg ad4.cfg
The switch prompts you for the scpadmin password.
Uploading configuration to the switch using SCP
Enter the following command to upload configuration to the switch. You will be prompted for a password.
scp <
local filename
> <
user
>@<
switch IP address
>:putcfg
For example:
>> # scp ad4.cfg [email protected]:putcfg
Applying and saving configuration
Enter the
apply
and
save
commands after the command above (
scp ad4.cfg 205.178.15.157:putcfg
), or use the
following commands. You will be prompted for a password.
>> # scp <
local_filename
> <
user
>@<
switch IP addr
>:putcfg_apply
>> # scp <
local_filename
> <
user
>@<
switch IP addr
>:putcfg_apply_save
For example:
>> # scp ad4.cfg [email protected]:putcfg_apply
>> # scp ad4.cfg [email protected]:putcfg_apply_save
Note the following:
The
diff
command is automatically executed at the end of
putcfg
to notify the remote client of the difference
between the new and the current configurations.
putcfg_apply
runs the
apply
command after the
putcfg
is done.
putcfg_apply_save
saves the new configuration to the flash after
putcfg_apply
is done.
The
putcfg_apply
and
putcfg_apply_save
commands are provided because extra
apply
and
save
commands
are usually required after a
putcfg.