I heard recently that WPA2 passwords can be brute forced if somebody captures handshake (which is not very difficult). Can somebody tell if a similar method exists for cracking SSH traffic? I mean some method for brute forcing my password on a local PC without having to connect to the server all the time.
WPA2's design makes the serious mistake of using the same human-derived secret for confidentiality and authentication. If you capture the 4-way handshake and successfully brute force it offline, you can derive the key that is used to encrypt the data. SSH, on the other hand, uses public key cryptography. The SSH password, if one is even used, only performs authentication. The actual encryption key is generated randomly and is much too strong to brute force. The key agreement algorithm (ECDHE in most cases) is likewise too strong to attack. You could try to, but it would hold until the sun goes out.
Even if you could guess the authentication password (which would have to be brute forced online, which is noisy and slow), you would not be able to retroactively decrypt any captured session data.
How WPA2 exchanges keys
WPA2 exchanges encryption keys using the 4-way handshake, or 4WH. This handshake itself is encrypted by a key that is derived from the WPA2 password by passing it through an algorithm called PBKDF2. The encrypted 4WH allows both parties to hold all the necessary secrets required to establish a secure connection. An attacker can attempt to guess the password by rapidly feeding many possible passwords into PBKDF2 and using the output to attempt to decrypt the 4WH. If the decryption succeeds, the password has been found. The 4WH is decrypted and the encrypted session data can be retroactively decrypted using the derived secrets.
Note that this only applies to WPA2 Personal, not WPA2 Enterprise which is more secure.
How SSH exchanges keys
SSH works differently. Rather than using the user-supplied password to encrypt data, the password is used exclusively to authenticate the client to the server. Even before the client is authenticated, a key agreement takes place. This involves the client and the server both generating a public and private key and sending each other their public key. The client and server then perform calculations on the other's public key and their own private key. The mathematics of the algorithm, typically a variant of the Diffie-Hellman algorithm, works such that both calculations produce the same secret value. The encryption keys are then derived from this shared secret. Even if you capture both the client and server's public keys, you won't be able to figure out the shared secret.