When you log in to a device in SSH mode and the ssh user, ssh user authentication-type, and ssh user service-type commands are not run to create an SSH user, you cannot access the network after the undo ssh authentication-type default password command is run.
If the ssh user, ssh user authentication-type, or ssh user service-type command is used to create an SSH user, the authentication mode specified in the ssh user authentication-type command takes effect. After you run the undo ssh authentication-type default password command, password authentication is not used by default for logins.