As wireless sensor networks (WSN) have gained popularity due to their broader applications areas, so does the need for effective security mechanisms. Encryption can be used to protect data communication, but severe resource constraints in WSN make necessary key distribution very difficult. This study addresses the problem of key establishment in WSN using a key pre-distribution scheme. In this study, the authors have proposed a symmetric key generation and pre-distribution scheme, using a symmetric matrix and generator matrix of maximum rank distance (MRD) codes. Sensor nodes are divided into groups and some information is stored at each node to enable it to generate link keys. This node division substantially improves the memory required at each node, which is approximately equal to the group size. The proposed scheme also reduces the communication overhead to setup a link key. It requires only two messages to setup a link key between any two nodes. Furthermore this scheme also provides the highest level of network connectivity and scalability. Any two nodes in the network can establish a link key and new nodes can be added at any time without changing any information on previously deployed nodes.