There are several ways. The recommended way to do an upgrade is via console (direct console to an SGM on each chassis).
Alternative ways:
1. Fail over chassis so that 2 is active. When you ssh to the mgmt IP, you will connect to chassis 2. Do the reverse for connecting to chassis 1. See "Configuring chassis state" in the admin guide for the commands.
2. Assign a UIPC to chassis 2. This way each chassis has its own mgmt. IP address. See admin guide on configuring UIPC.
You can always connect to another SGM using the "blade" command. However this is not recommended for an upgrade.