Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

SSH – A View

By: Gowtham G
4 March 2024 at 07:32

SSH, also known as Secure Shell or Secure Socket Shell, is a network protocol that gives users, particularly system administrators, a secure way to access a computer over an unsecured network.

By default SSH is installed in linux.We can check the version by using this below command.

ssh -V

Otherwise we can install it by..,

sudo apt install openssh-server openssh-client
sudo systemctl status ssh

Also we can check the status of SSH.The default Port Number assigned by ssh is 22.We can change it in the configuration file also we can allow or deny users or groups and Alive Interval in the configuration file.
NOTE :
Restart the ssh after configured.

nano /etc/ssh/sshd_config
AllowUsers user_name
AllowGroups group_name

To allow permissions to specific users and groups to access ssh.

DenyUsers user_name
DenyGroups group_name

To deny the permission to specific users and groups.

LoginGraceTime specify_time

(i.e) 1m ==> 1 minute.
If a user can’t make a successful login with the specific time,it will not allow the user to enter into the remote machine.

ClientAliveInterval 600
ClientAliveCountMax 0 ==> Default it is zero.

(i.e) 600 ==> 600 seconds = 10 minutes.
The tunnel will break after the mentioned time (600 seconds) if there is no actions were performed by the user in the server.

NOTE: Restart the service once changes are made in configuration file.

ssh user_name@remote_ip
ssh user_name@remote_hostname -p port_number

To connect to the ssh server we must need three credentials of the remote machine.

  • Username.
  • Password.
  • Ip Address or Hostname.
scp file_to_transfer user_name@hostname:/path_to_copy_the_file_in_remote_server

scp -P specific_port_number file_to_transfer user_name@hostname:/path_to_copy_the_file_in_remote_server ===> For using Port Number other than 22.

Example : scp hello.go student@ip_address:/home/student/Checking_scp_command/
scp -P 2027 hello.go student@ip_address:/home/student/Checking_scp_command/

SCP ==> Secure Copy.
To copy a file securely to the remote server’s directory named “Checking_scp_command”.

scp user_name@hostname:/path_of_the_file/file /path_to_copy_in_local_system

scp -P specific_port_number user_name@hostname:/path_of_the_file/file /path_to_copy_in_local_system ===> For using Port Number other than 22.

Example : scp student@ip_address:/home/student/Checking_scp_command/Remote_to_Local.txt /home/g/Downloads/
scp -P 2027 student@ip_address:/home/student/Checking_scp_command/Remote_to_Local.txt /home/g/Downloads/

In this command,we are going to get the file from remote server to our local system.

NOTE:

There is a command called “ssh-keygen” which generates a unique key for accessing the remote server via local system.
This never ask passwords to enter into the system,But be careful of handling this key.If you are not familiar with this method,just practice with the password type few times.
Keygen will be discussed later in our next post.Stay tuned…

That’s it..!

SSH – A View

By: Gowtham G
4 March 2024 at 07:32

SSH, also known as Secure Shell or Secure Socket Shell, is a network protocol that gives users, particularly system administrators, a secure way to access a computer over an unsecured network.

By default SSH is installed in linux.We can check the version by using this below command.

ssh -V

Otherwise we can install it by..,

sudo apt install openssh-server openssh-client
sudo systemctl status ssh

Also we can check the status of SSH.The default Port Number assigned by ssh is 22.We can change it in the configuration file also we can allow or deny users or groups and Alive Interval in the configuration file.
NOTE :
Restart the ssh after configured.

nano /etc/ssh/sshd_config
AllowUsers user_name
AllowGroups group_name

To allow permissions to specific users and groups to access ssh.

DenyUsers user_name
DenyGroups group_name

To deny the permission to specific users and groups.

LoginGraceTime specify_time

(i.e) 1m ==> 1 minute.
If a user can’t make a successful login with the specific time,it will not allow the user to enter into the remote machine.

ClientAliveInterval 600
ClientAliveCountMax 0 ==> Default it is zero.

(i.e) 600 ==> 600 seconds = 10 minutes.
The tunnel will break after the mentioned time (600 seconds) if there is no actions were performed by the user in the server.

NOTE: Restart the service once changes are made in configuration file.

ssh user_name@remote_ip
ssh user_name@remote_hostname -p port_number

To connect to the ssh server we must need three credentials of the remote machine.

  • Username.
  • Password.
  • Ip Address or Hostname.
scp file_to_transfer user_name@hostname:/path_to_copy_the_file_in_remote_server

scp -P specific_port_number file_to_transfer user_name@hostname:/path_to_copy_the_file_in_remote_server ===> For using Port Number other than 22.

Example : scp hello.go student@ip_address:/home/student/Checking_scp_command/
scp -P 2027 hello.go student@ip_address:/home/student/Checking_scp_command/

SCP ==> Secure Copy.
To copy a file securely to the remote server’s directory named “Checking_scp_command”.

scp user_name@hostname:/path_of_the_file/file /path_to_copy_in_local_system

scp -P specific_port_number user_name@hostname:/path_of_the_file/file /path_to_copy_in_local_system ===> For using Port Number other than 22.

Example : scp student@ip_address:/home/student/Checking_scp_command/Remote_to_Local.txt /home/g/Downloads/
scp -P 2027 student@ip_address:/home/student/Checking_scp_command/Remote_to_Local.txt /home/g/Downloads/

In this command,we are going to get the file from remote server to our local system.

NOTE:

There is a command called “ssh-keygen” which generates a unique key for accessing the remote server via local system.
This never ask passwords to enter into the system,But be careful of handling this key.If you are not familiar with this method,just practice with the password type few times.
Keygen will be discussed later in our next post.Stay tuned…

That’s it..!

WordPress – Installation

By: Gowtham G
29 February 2024 at 14:15

Let us know how to install wordpress in debian linux with the command line.
First,we need to create a database for a new user mainly for wordpress in mariadb.
Start the Apache server and mariadb service.Switch into mariadb then create a new user,which is already we discussed in mariadb installation.

I created a unique Database named “database_wordpress” specially for wordpress,also i created a new user.

wget https://wordpress.org/latest.zip
unzip latest.zip
sudo mv wordpress/ /var/www/html/
sudo chown www-data:www-data -R /var/www/html/wordpress/
sudo chmod -R 755 /var/www/html/wordpress/
sudo nano /etc/apache2/sites-available/wordpress.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/wordpress
ServerName <server_ip>
<Directory /var/www/html/wordpress/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

These content must be written in the wordpress.conf file.
NOTE: Replace “localhost” in the pace of <server_ip> (4th line).

sudo systemctl reload apache2
sudo a2ensite wordpress.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
rm latest.zip

You have successfully installed wordpress,by checking it open a browser and pass the url as “localhost” it will displays the wordpress page containing language selection dropdown.

That’s it…
Start publishing your thoughts to the world..!

WordPress – Installation

By: Gowtham G
29 February 2024 at 14:15

Let us know how to install wordpress in debian linux with the command line.
First,we need to create a database for a new user mainly for wordpress in mariadb.
Start the Apache server and mariadb service.Switch into mariadb then create a new user,which is already we discussed in mariadb installation.

I created a unique Database named “database_wordpress” specially for wordpress,also i created a new user.

wget https://wordpress.org/latest.zip
unzip latest.zip
sudo mv wordpress/ /var/www/html/
sudo chown www-data:www-data -R /var/www/html/wordpress/
sudo chmod -R 755 /var/www/html/wordpress/
sudo nano /etc/apache2/sites-available/wordpress.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/wordpress
ServerName <server_ip>
<Directory /var/www/html/wordpress/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

These content must be written in the wordpress.conf file.
NOTE: Replace “localhost” in the pace of <server_ip> (4th line).

sudo systemctl reload apache2
sudo a2ensite wordpress.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
rm latest.zip

You have successfully installed wordpress,by checking it open a browser and pass the url as “localhost” it will displays the wordpress page containing language selection dropdown.

That’s it…
Start publishing your thoughts to the world..!

Installation – MARIADB

By: Gowtham G
14 February 2024 at 13:57

Let’s know the installation of mariadb in debian.

sudo apt update
sudo apt install mariadb-server mariadb-client

First of all,we need to update the package manager and then type the install command.

Here we are going to install two packages i.e.., for server side and client side.You can skip the “mariadb-client” if you don’t need.

sudo systemctl status mariadb.service

Using this command,we can check the status of mariadb.Refer the image.

Now,we successfully done with the installation.After this we need to set a password to the root user.Because,by default the root user doesn’t have any password.So,we need to use this command..,

sudo mysql_secure_installation

Simply,press enter and then press ‘N’ next press ‘Y’ for further steps.

Also,you can create a new user.Let’s see how to create a new user.

CREATE USER 'your_username'@'localhost' IDENTIFIED BY 'your_password';

GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;

User has been created.

Let’s enter into mariadb.

mariadb -u your_username -p

NOTE: Don’t pass “@localhost” here.Simply pass username only.

Now,enter the created password.

If the output displayed like this,you were done…

SHOW DATABASES;

Here,we can see the databases.

We can discuss it later on MySQL topics.

EXIT;

Exit from mariadb.

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Getting this configuration file,we can change some configuration.

NOTE :

After configure,we must restart the mariadb.

sudo systemctl start mariadb.service
sudo systemctl stop mariadb.service
sudo systemctl enable mariadb.service
sudo systemctl disable mariadb.service
sudo systemctl restart mariadb.service

We can use these commands as per our convenience like we discussed in Apache installation.

That’s it..!

Installation – MARIADB

By: Gowtham G
14 February 2024 at 13:57

Let’s know the installation of mariadb in debian.

sudo apt update
sudo apt install mariadb-server mariadb-client

First of all,we need to update the package manager and then type the install command.

Here we are going to install two packages i.e.., for server side and client side.You can skip the “mariadb-client” if you don’t need.

sudo systemctl status mariadb.service

Using this command,we can check the status of mariadb.Refer the image.

Now,we successfully done with the installation.After this we need to set a password to the root user.Because,by default the root user doesn’t have any password.So,we need to use this command..,

sudo mysql_secure_installation

Simply,press enter and then press ‘N’ next press ‘Y’ for further steps.

Also,you can create a new user.Let’s see how to create a new user.

CREATE USER 'your_username'@'localhost' IDENTIFIED BY 'your_password';

GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;

User has been created.

Let’s enter into mariadb.

mariadb -u your_username -p

NOTE: Don’t pass “@localhost” here.Simply pass username only.

Now,enter the created password.

If the output displayed like this,you were done…

SHOW DATABASES;

Here,we can see the databases.

We can discuss it later on MySQL topics.

EXIT;

Exit from mariadb.

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Getting this configuration file,we can change some configuration.

NOTE :

After configure,we must restart the mariadb.

sudo systemctl start mariadb.service
sudo systemctl stop mariadb.service
sudo systemctl enable mariadb.service
sudo systemctl disable mariadb.service
sudo systemctl restart mariadb.service

We can use these commands as per our convenience like we discussed in Apache installation.

That’s it..!

Install / Uninstall Apache server in Linux

By: Gowtham G
8 February 2024 at 13:41

Here,we are going to discuss about how to install apache server in debian.

sudo apt update
sudo apt install apache2

Once,the packages are installed in your system.Run the server by the following command.

sudo systemctl start apache2

Now you can check the status whether it is running or not by using..,

sudo systemctl status apache2

Active: active (running) since Thu 2024-02-08 18:37:49 IST; 11s ago
You can check that it is running.Also there is a another method to check by entering http://localhost/ in any of your browser.

sudo systemctl enable apache2

If you don’t want to start every time and by default the server should be on running,use the above command.It starts automatically when the system boots.

sudo systemctl stop apache2

This command will stop the server.

sudo systemctl disable apache2

This will disable the server and is not running after the system boots.

Now,we can see how to remove apache server.

sudo apt remove --purge apache2

This will remove the apache2 server from your system.

sudo apt autoremove

This command is used to remove the apache related dependencies automatically from the system.

That’s it…

Installation of Tamil 99 Keyboard on Debian

By: Gowtham G
3 February 2024 at 06:12

A new way to learn the installation of ‘Tamil 99 Keyboard’ on Debian and Debian based Distrios.

sudo apt install ibus-m17n

By using this command on the terminal we can install Tamil99 keyboard in our system.

  1. Navigate to the Settings and go to ‘IBus Preferences’.
  2. Go tho Input Method and select ‘Add’ button.
  3. Select the More option mentioned ( 3 Dots) and choose the language as Tamil.
  4. Select Tamil (TamilNet 99) and click ‘Add’ and close the windoow.
  5. Now you can choose the language in the Keyboard Preference on Desktop to Tamil or English.

This is one of the Pure Layout for the language Tamil.
If you want to use Tamil Phonetic Layout use this command line in the terminal.

NOTE : IF YOU ALREADY INSTALLED THE ABOVE COMMAND,LEAVE THE LAST PACKAGE “ibus-m17n” below and install remaining packages.

sudo apt-get install m17n-db m17n-contrib ibus-m17n

The methods are same as mentioned above.

Select [ Tamil – ta-phonetic (m17n) as input method to use phonetic layout.

Thanks to Kaniyam ‘Shrinivasan’ for getting me this information.

 

Installation of Tamil 99 Keyboard on Debian

3 February 2024 at 06:12

A new way to learn the installation of ‘Tamil 99 Keyboard’ on Debian and Debian based Distrios.

sudo apt install ibus-m17n

By using this command on the terminal we can install Tamil99 keyboard in our system.

  1. Navigate to the Settings and go to ‘IBus Preferences’.
  2. Go tho Input Method and select ‘Add’ button.
  3. Select the More option mentioned ( 3 Dots) and choose the language as Tamil.
  4. Select Tamil (TamilNet 99) and click ‘Add’ and close the windoow.
  5. Now you can choose the language in the Keyboard Preference on Desktop to Tamil or English.

This is one of the Pure Layout for the language Tamil.
If you want to use Tamil Phonetic Layout use this command line in the terminal.

NOTE : IF YOU ALREADY INSTALLED THE ABOVE COMMAND,LEAVE THE LAST PACKAGE “ibus-m17n” below and install remaining packages.

sudo apt-get install m17n-db m17n-contrib ibus-m17n

The methods are same as mentioned above.

Select [ Tamil – ta-phonetic (m17n) as input method to use phonetic layout.

Thanks to Kaniyam ‘Shrinivasan’ for getting me this information.

 

❌
❌