PMA-65 and PMA-85 quick start guide: Difference between revisions

From wiki.comcert.com
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
<pre> # ssh -l Administrator <IPaddressPMA-65>
<pre> # ssh -l Administrator <IPaddressPMA-65>
</pre>
</pre>
= &nbsp; =


= Access to&nbsp;the virtual machines =
= Access to&nbsp;the virtual machines =


The virtual machines running on&nbsp;this appliance are accessible through SSH,&nbsp;HTTP and VNC.
It is recommeded to verify the&nbsp;
 
*SSH
<pre># ssh -l TVadmin <IPaddressTVC>
# ssh -l TVadmin <IPaddressTVF>
</pre>
 
*HTTP
 
https://<IPaddressTVC>
 
https://<IPaddressTVF>
 
*VNC
 
Console vTVC <IPaddressPMA-65>:9801
 
Console vTVF <IPaddressPMA-65>:9802


&nbsp;
&nbsp;


= Reboot / Halt appliance =
= Shutdown and reboot the appliance =


&nbsp;
&nbsp;
Line 51: Line 36:
&nbsp;
&nbsp;


Shutdown the instance properly:
Step 1 - shutdown the appliactions
<pre>[TVadmin@vtvc ~]$ sudo su -
Last login: Fri Oct  7 19:26:23 UTC 2016 on pts/0
[root@vtvc ~]# shutdown -h now
</pre>
<pre>[TVadmin@vtvf ~]$ sudo su -
Last login: Fri Oct  7 19:26:23 UTC 2016 on pts/0
[root@vtvf ~]# shutdown -h now
</pre>
 
Verify the instances are powered off:
<pre>[root@appliance ~]# virsh list --all
</pre>
 
Now it is safe to shut down the appliance:
<pre>[root@appliance ~]# shutdown -h now
</pre>
 
Now it is safe to reboot the appliance:
<pre>[root@appliance ~]# shutdown -r now
</pre>
 
The instances are started automatically when the appliance boots.
 
&nbsp;
 
= Disable SSH login for root user =
 
A best practice is to disable the SSH login for the root user account. In the example found below we create a user account named&nbsp;''customer ''with the password ''s3cure!'':
 
Add the user. In the following example, we will use the user name ''customer''. The command adduser will automatically create the user, initial group, and home directory.
<pre>[root@appliance ~]# adduser customer
[root@appliance ~]# id customer
uid=1001(admin) gid=1001(customer) groups=1001(customer)
[root@appliance ~]# ls -lad /home/customer/
drwx------ 2 customer customer 4096 Jun 25 16:01 /home/customer/
</pre>
 
Set the password for the ''customer'' user. When prompted, type and then retype the password.
<pre>[root@appliance ~]# passwd customer
Changing password for user customer.
New UNIX password: s3cure!
Retype new UNIX password: s3cure!
passwd: all authentication tokens updated successfully.
[root@appliance ~]#
</pre>
 
For sudo permissions for your new admin user, use the following command.
<pre>[root@appliance ~]# usermod -aG wheel customer
</pre>
 
SSH to the server with the new admin user and ensure that the login works.
<pre>[root@appliance ~]# ssh -l customer <IPaddressPMA-65>
customer@<IPaddressPMA-65>'s password: s3cure!
[customer@appliance]#
</pre>
 
Verify that you can su (switch user) to root with the admin user.
<pre>[customer@appliance ~]$ sudo su -
Password: s3cure!
[root@appliance ~]$ whoami
root
</pre>
 
To disable root SSH login, edit /etc/ssh/sshd_config with your favorite text editor.
<pre>[root@appliance ~]# vi /etc/ssh/sshd_config
</pre>
 
Change this line:
<pre>#PermitRootLogin yes
</pre>


Edit to this:
Step 2 - shutdown the virtual machines
<pre>PermitRootLogin no
</pre>


Ensure that you are logged into the box with another shell before restarting sshd to avoid locking yourself out of the server.
Step 3&nbsp;- verify the status of the virtual machines
<pre>[root@appliance ~]# systemctl restart sshd
[root@appliance ~]#
</pre>


You will now be able to connect to your server via ssh with the&nbsp;''customer'' user and then use the command <span class="screenshot_callout">sudo su -</span>&nbsp;to switch to the root user.
Step 4&nbsp;- shutdown or reboot the appliance

Revision as of 16:24, 9 August 2020

Introduction

All Performance Management Appliances (PMA) are based on a hardened versions on CentOS 7 64-bit Linux Operating System

Kernel-based Virtual Machine (KVM) is used as virtualization platform.

 

Access to the appliance

 

 

PMA is accessible through ssh using your favorite terminal emulator. The appliance ships with two user accounts, Administrator and comcert. User Administrartor has been created to allow the end-user to safely shut down and reboot the appliance. User comcert is reserved for COMCERT support engineers.

 # ssh -l Administrator <IPaddressPMA-65>

 

Access to the virtual machines

It is recommeded to verify the 

 

Shutdown and reboot the appliance

 

 

Step 1 - shutdown the appliactions

Step 2 - shutdown the virtual machines

Step 3 - verify the status of the virtual machines

Step 4 - shutdown or reboot the appliance