SSH command line tool How To

Opening a SSH session to a remote machine

The SSH command line to open a session to a remote machine is called ssh.
The syntax is:

ssh remote_machine_ip/hostname
In this case, you will open a SSH session using your currently logged in user as a user for the remote machine,

the SSH command will interpret the command to:

ssh your_current_logged_in_user@hostname
Example:

[root@geek-kb ~]# whoami

Read More

How to find current date and time in Python datetime module?

  How to find current date and time in Python datetime module? How do I find out the current date and time in Python? What is the module or function I need to use to get current time or date in Python programming language? Tutorial details Difficulty Easy (rss) Root privileges No Requirements Python v2.x+ Estimated…

Read More

Bash Script: Basic internal network services

This script will auto configure basic internal network services: I would like to share with you a script I wrote which auto-configures a Linux machine to work with network services. After editing and running the script: The machine will pull all packages from a currently installed server (of your choice). It will turn off SELINUX and…

Read More

Bash Colors: colorizing shell scripts

Bash Colors: colorizing shell scripts Shell scripts commonly used ANSI escape codes for color output. Following table shows Numbers representing colors in Escape Sequences. Color Foreground Background Black 30 40 Red 31 41 Green 32 42 Yellow 33 43 Blue 34 44 Magenta 35 45 Cyan 36 46 White 37 47   The numbers in…

Read More

auto login between Linux machines

Tutorial: Allow auto login between Linux machines In my work, I create many shell scripts which automate different procedures. Sometimes, it is required that a script will be able to log into a remote machine and run some commands there or get files from the remote machine, so doing this “trick” will allow the script…

Read More

Bash: The shift command built-in

The shift command built-in What does it do? The shift command is one of the Bourne shell built-ins that comes with Bash. This command takes one argument, a number. The positional parameters are shifted to the left by this number, N. The positional parameters from N+1 to $# are renamed to variable names from $1 to $# – N+1. Say you have a command that…

Read More