Font size
WorksheetsLinux-2 Quiz 2 -- LAMP
Total questions: 15
Worksheet time: 9mins
Default Apache stores its html pages in:
/etc/www
/var/www
/apache/www
/var/www/html
The default configuration file of Apache on Debian-based Linux distributions is?
etc/apache2/apache2.conf
/etc/httpd.conf
var/apache/apache.conf
var/htpd.conf
On which port does Apache run by default?
443
80
8080
22
How to use more commands in a single line on the command-prompt?
Seperate them with the ‘|’
Seperate them with the ‘:’
Seperate them with the ‘;’
Seperate them with the ‘/’
What will happen if the command ‘touch /fake 2> /tmp/error.msg’ is issued under user root, assuming that the file ‘fake’ does not exist?
You will get an error indicating the file cannot be written tot he the location /tmp
You will get a ‘file not found error’ on your screen’
You will get an error indicating the file cannot be written to the the location /tmp
You will get an empty file in ‘/tmp’ called ‘error.msg’
What is true about SSH-CONNECT ?
The SSH-CONNECT protocol manages server authentication, privacy and data integrity
The SSH-CONNECT protocol runs on the transport layer and authenticates the client’s credentials to the server
The SSH-CONNECT connection protocol runs above the user authentication protocol to multiplex the single encrypted channel into multiple logical channels
SSH-CONNECT connection manages both server authentication and user authentication
How can you check the current SSH daemon version installed on your Ubuntu/Debian Linux system?
sshd --version
rpm -ihv ssh
ssh -V
yum -check ssh
Open-SSH provides programs such as:
sshd
ssh
scp
sftp
Whats is the correct syntax for creating a backup (export) of a mysql-database?
mysql -u -p databasename > dbsample.sql
mysqldump -u -p databasename > dbsample.sql
mysql -u -p databasename < dbsample.sql
mysqldump -u -p databasename < dbsample.sql
What is defined in the file ‘~/.ssh/authorized_keys’
DSA and RSA private key of the user
List of servers, along with host keys accessed by the user
List of authorized public keys for servers, verified by the server to authenticate the user when login is attempted
RSA private key of the user, verified by the server to authenticate the user when login is attempted
What is the correct syntax for a secure copy command, to copy the file "foobar.txt" from the local host to a remote host?
scp foobar.txt your_username@remotehost.edu:/some/remote/directory
scp your_username@remotehost.edu:/some/remote/directory foobar.txt
scp foobar.txt remotehost.edu:/some/remote/directory -u your_username
scp -u your_username@remotehost.edu:/some/remote/directory foobar.txt
The correct command in Linux to restart the ssh daemon is:
systemctl ssh restart
sshd restart now
sudo service restart sshd
sudo systemctl restart sshd
The command to create an SSH private and public keys is:
ssh-keygen
ssh-copy-id –i /home/bob/.ssh/id_rsa REMOTESERVER
pubpriv
ssh -c
How to disable the root user to login in a linux server running SSH?
Open the file ‘ /etc/ssh/sshd_config ‘ and change the parameter ‘PermitRootLogin yes’ to ‘PermitRootLogin no’ and restart the ssh service.
Open the file ‘ /var/log/sshd_config ‘ and change the parameter ‘PermitRootLogin yes’ to ‘PermitRootLogin no’ and restart the ssh service
Open the file ‘ /var/log/auth.log ‘ and delete the parameter ‘PermitRootLogin and restart the server
Do nothing; The Root user can never login using SSH
What is the correct Linux command to stop the 'mysql-server' (assuming it is installed) when working under Root?
mysql stop
stop service mysql
systemctl stop mysql.service
service stop mysql
