Method and device for accessing network

The invention discloses a method and a device for accessing network and belongs to the technical field of intelligent equipment. The method comprises the steps as follows: transmitting a first broadcast message, wherein the first broadcast message comprises identification information of the intelligent equipment or media access control MAC address; receiving cryptographic a service set identifier SSID and a password, which are transmitted by a receiving terminal or a network access device, deciphering the cryptographic SSID and password according to a communication key, which is stored in advance, wherein the communication key is in only association with the intelligent equipment; initiating a connection to the network access equipment according to the deciphered SSID and the password. The method and the device for accessing the network of the invention avoid the SSID and the password from being obtained via cracking a public key after the SSID and the password, which are encrypted by the public key, are intercepted by others to improve access safety of the network access equipment.