The SonarQube server can be accessed using the following URL:
http://<ip address of instance>:9000
Enter both username and password as "admin" and change the password after logging in.
SonarQube homepage
Go to Profile > Security and generate a new token which will be used in the Jenkins pipeline.
Generating a token for Jenkins
Inside Jenkins Dashboard, go to Manage Jenkins > Credentials > System > Global Credentials and add a new credential. Set the Kind as Secret Text and paste the SonarQube token and put the ID as "sonarqube". This ID is used to fetch the token in the Jenkinsfile.