Friday, November 29, 2019

Useful Tip

let me give you one useful tip.
if you want to see a file content you can use cat.
but i suggest you to use head or tail command. because  you can check the first or last lines. it will be better for you. less to see is better. then if you need to see complete content of file you will use cat.

Alias

I love Linux. because you can use alias. what is alias???
it's a kind of shortcut for CLI. for example you can type p instead of poweroff or whatever you want.

you can config your alias by editing ~/.bashrc file.
you should config it like this:
alias p='poweroff'
then save it and restart your bash.
hope to be useful.

Wednesday, November 27, 2019

Favorite editor

what is your favorite editor?????
most of SysAmins use vi/vim. but me, I use nano. this is my favorite editor. very easy to work, very easy to install. all you need to do is type yum install nano/apt install nano.

but honestly as SysAdmin, you must know how to work with vi.

Server hardening

If you want to prevent your server from attack, you should disable root ssh login. for this you should proceed to /etc/ssh and open sshd_config with your favorite editor and change permit root login to no.
done. you can even change your default ssh port to prevent attack. edit /etc/ssh/sshd_config with your favorite editor. uncomment #Port 22 and change 22 to another port. its important to open that port on firewall. after that restart your sshd service by systemctl restart sshd command.




************just be careful, if selinux is set to enforcing, you can't ssh to your server with any users except root.

Important Commands

when you login to new Linux server or system what commands do you enter first???

me???? I use five important commands to check that my vps is working well or not.
here :
1=top: this command show top proccesses that running on system. use it to understand where is your resources are using.
2=netstat: use this command to check your vps connection to internet.
3=last: this command will teell you that who was connected to your vps. it will show you the ip addresses.
4=w: yes. just w. this command show you who is connected to your vps by ssh right now. very cool???right????
5=df: it will show you your system hard disk storage. you can use -h to make it clear for human.

as Systemadministrator you should now and use this commands. Hope you enjoy it.

SELinux

as Sysadmin you must know how to secure Linux systems. one of the most important part of that is SELinux. what is it?????

SELinux  is an acronym for Security-enhanced Linux.it is a security feature of the Linux kernel. It is designed to protect the server against misconfigurations or compromised daemons.
you can access the configuration file by /etc/selinux and config it as you want. but trust me, if you set it on enforcing, only root can ssh to your server. so careful about it.

First Post

this is my first post. all I want to do is that to help you to find out more about Linux and System administration and python programming. I hope I can help you to achieve this goal.
wish you luck😅😅😅