1 installing Ubuntu 14 with VMware Workstation
2 Go to ubuntu command line CTRL+ALT+F2
3 The default root user is not a fixed password, and is locked, if you want to set a password for root
Simply execute the command: sudo passwd root and then follow the prompts step-by-step to
This can be referred to in (1) as the SU root, enter the root password to switch to the root user
Note: After setting the password for root, sudo su can still switch to the root user
Attached: Users and groups in the graphical mode system---system management can also set a password for root
3 If Root is disabled, refer to:
disabling and enabling root login
Execute sudo passwd-l root (just disable root, but the root password is still saved), then perform SU root discovery authentication failed,
To start root login again, execute sudo passwd-u root.
4 Modifying a remote SSH port
Vi/etc/ssh/sshd_config
Click Insert to enter modify mode click ESC to use the Delet function
Modify port port defaults to 22 to 12315
Click ESC
: q! Exit does not save
: wq! Exit Save
5 allow SSH to log in directly to root
To edit the configuration file for ssh, command: nano/etc/ssh/sshd_config
in AU Thentication section, comment out "Permitrootlogin without-password"
 
authentication section, add "Permitrootlogin yes"
 
6 Configure NAT
 
 
The host port is a local port such as 33333
Virtual machine IP as intranet IP can be viewed through a graphical interface
And finally the mapped port, such as the remote SSH port 12315.
6 visits
Native access virtual machine SSH can access the virtual machine intranet IP Port 12315 via SECURECRT
External network access is required to map ports via software such as peanut shells
Build Ubuntu locally