Expect Command Automate SSH Login | Tech Arkit
Expect is a program that "talks" to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue. In addition, the user can take control and interact directly when desired, afterward returning control to the script.
Expect scripting language is used to feed input automatically to an interactive program.1
- Cause your computer to dial you back, so that you can login without paying for the call.
- Start a game (e.g., rogue) and if the optimal configuration doesn't appear, restart it (again and again) until it does, then hand over control to you.
- Run fsck, and in response to its questions, answer "yes", "no" or give control back to you, based on predetermined criteria.
- Connect to another network or BBS (e.g., MCI Mail, CompuServe) and automatically retrieve your mail so that it appears as if it was originally sent to your local system.
- Carry environment variables, current directory, or any kind of information across rlogin, telnet, tip, su, chgrp, etc.
- Send – to send the strings to the process
- Expect – Wait for the specific string from the process
- Spawn – to start the command
- Interact – The interact command allows you to interact with your program. This means that the interact command it says to expect command to release the terminal so you can write things and do things.
- Puts – echo out the text
RHCSA 2021 | Red Hat Certified System Administrator EX200 | Tech Arkit
Linux Tutorial | Complete Beginners Guide | Tech Arkit
Introduction to Linux.
Directory structure
RHEL 8 Installation
Remote Server OS Installation
Booting Process
Updating Linux packages
Accessing Linux Server GUI & CLI
Switching users in multiuser target
Standard Input, Output and Error
Basic Commands - cat, cd, ls, ..etc
Creating soft links and hard links
Text Editors nano & vim
Compressing and un-compressing files & folders
Getting Help from command Line User Interface
Grep command regular expressions
YUM Repository configuration
SSH Server & Client configuration
Configure Key-based authentication
NTP configuration
Copying files to remote server
Listing and Managing Linux processes
File permissions
Creating standard Linux partitions
Deleting standard Linux partitions
Creating PVs, VGs, and LVM
Extend Logical Volumes non-destructively
Reduce LVM size - lvreduce
Swap Memory Explained | How to Create swap partition & extend
Creating Users and Groups
Modify user properties | Password age
Deleting users and groups
Access control list - ACL
Special Linux file permissions Set-GID, Set-UID, Sticky Bit
Sudo access - sudoers policy
Linux Networking | Assign Static IP
Firewall Rules | firewalld | Firewall-cmd
SELinux to enforcing policies
Shell Scripts :
if statement
for loop
Positional parameters
Exit codes
Scheduling future tasks - crontab
Installing and updating packages using RPM & YUM
Find and retrieve container images from a remote registry
Inspect container images
Perform container management using commands such as podman and skopeo
Perform basic container management such as running, starting, stopping, and listing running containers
Run a service inside a container
Configure a container to start automatically as a systemd service
Attach persistent storage to a container https://docs.oracle.com/en/learn/storage_podman_containers/index.html#using-volumes-with-containers
VNC Server Installation and configuration
NFS Server Installation and configuration
Autofs configuration
Samba Server Installation and Configuration
Linux Tutorial for Beginners | Tech Arkit
Video Timelines
______________________________________________________________
00:10 Course Curriculum
13:05 Introduction to Linux.
25:13 Directory structure
43:04 RHEL 8 Installation
Registration Link: https://www.redhat.com/wapps/ugc/regi...
56:46 Remote Server OS Installation
1:10:57 Booting Process
1:16:10 Subscription manager & Updating Linux packages
1:27:33 Accessing Linux Server GUI & CLI
1:41:57 Switching users in multiuser target
1:55:00 Standard Input, Output and Error
2:07:36 Basic Commands - cat, cd, ls, ..etc
2:46:10 Creating soft links and hard links
3:00:30 Text Editors nano & vim
3:20:00 Compressing and un-compressing files & folders
3:40:48 Getting Help from command Line User Interface
3:56:14 Grep command regular expressions
4:12:15 YUM Repository configuration
4:19:18 SSH Server & Client configuration
4:41:20 Configure Key-based authentication
4:45:00 NTP configuration
4:52:31 SCP | Copying files to remote server
5:02:54 Listing and Managing Linux processes (ps and top commands)
5:20:53 File and Directory permissions
5:33:24 Creating standard Linux partitions
5:46:47 Deleting standard Linux partitions
5:47:55 Creating PVs, VGs, and LVM
6:05:01 Extend Logical Volumes non-destructively
6:15:56 Reduce LVM size - lvreduce
6:21:52 Swap Memory Explained | How to Create swap partition & extend
6:34:14 Creating Users and Groups | User Administration
7:08:59 Modify user properties | Password age
7:20:10 Deleting users and groups
7:21:34 Access control list - ACL
7:36:00 Special Linux file permissions Set-GID, Set-UID, Sticky Bit
7:43:22 Sudo access - sudoers policy
8:04:34 Linux Networking | Assign Static IP
8:24:31 Firewall Rules | Firewalld | firewall-cmd
8:39:59 SELinux - Security Enhanced Linux
9:04:11 Shell Scripts :
9:13:51 if statement
9:19:35 for loop
9:20:00 Positional parameters
9:23:00 Exit codes
9:26:26 Scheduling future tasks - crontab
9:42:05 Installing and updating packages using RPM & YUM
-------- Linux Containers Podman, Buildah, Skopeo and Runc --------
9:58:09 Find and retrieve container images from a remote registry
10:11:04 Inspect container images
10:16:32 Buildah Building the Images
10:30:34 Dockerfile | Build Buildah Images using Dockerfile
10:34:40 Attach persistent storage to a container
Building Container Image using buildah
- The Buildah package provides a command line tool that can be used to
- Create a working container, either from scratch or using an image as a starting point
- Create an image, either from a working container or via the instructions in a Dockerfile
- Images can be built in either the OCI image format or the traditional upstream Docker image format
- Mount a working container's root file system for manipulation
- Unmount a working container's root file system
- Use the updated contents of a container's root file system as a file system layer to create a new image
- Delete a working container or an image
- Rename a local container
buildah from centos
buildah images
buildah containers
curl -sSL https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz -o hello-2.10.tar.gz
buildah copy centos-working-container hello-2.10.tar.gz /tmp/
buildah run centos-working-container yum install -y tar gcc make
buildah run centos-working-container yum clean all
buildah run centos-working-container tar xvzf /tmp/hello-2.10.tar.gz -C /opt
buildah config --workingdir /opt/hello-2.10 centos-working-container
buildah run centos-working-container ./configure
buildah run centos-working-container make
buildah run centos-working-container make install
buildah run centos-working-container hello –v
buildah config --entrypoint /usr/local/bin/hello centos-working-container
buildah commit --format docker centos-working-container firstbuildah:latest
buildah images
podman save -o mybuild1.tar localhost/hello2latest
podman rmi 638d3f915ea2 –f
podman load -i mybuild1.tar
Podman RHEL 8 | Building, Running and Managing containers Red Hat
,podman tutorial
,podman vs docker
,podman container
,podman tutorial in hin
,padman pani
,podman redhat
,podman rhel 8
,podman networking
,padman full movie
,podman and docker
,podman and buildah
,podman and kubernetes
,podman and crio
,podman amazon linux 2
,podman api v2
,podman attach
,podman arch
,podman buildah
,podman build dockerfil
,podman build command
,podman build dockerfil
,podman buildah skopeo
,podman basic commands
,podman buildkit
https://github.com/techarkit/Linux-For-Beginners/blob/master/Linux_Video_Tutorial.md
Download Free Books: https://arkit-in.tradepub.com/free/w_advb01/?p=w_advb01
Follow Us on Social Media
WhatsApp Group: https://bit.ly/TechArkitWhatsAppGroup
Join Telegram Group: http://t.me/linuxarkit 3000 Members Joined
Github: https://github.com/techarkit/
Facebook: https://www.facebook.com/linuxarkit
Twitter: https://twitter.com/aravikumar48
Instagram: https://www.instagram.com/arkit.co.in/
Website: https://arkit.co.in
Blog: https://techarkit.blogspot.com/
Reddit: https://www.reddit.com/r/techtutorial/
Email: aravikumar48[at]gmail.com
Quora: https://www.quora.com/q/cxfarqipmxzajyne?invite_code=eaA2xM8guZ4pBOcQwzbs
Post your topic, we will make videos for you
https://forms.gle/M4ysoMNh1zsPXiw89
#TechArkit
Ansible Course
Automation with Ansible Course https://youtu.be/-b1ByalW4X8
Ansible Lab Setup https://youtu.be/p8xkv1m-boE
Ansible Inventory configuration https://youtu.be/G7_orKIWAeA
Ansible Ad-Hoc Commands with examples https://youtu.be/Kr-62ON416c
Writing your first Ansible playbook guide https://youtu.be/2nRfP69sGsk
How to variables in Ansible playbook https://youtu.be/nOOe-_rNhP8
Conditionals and Loops of Ansible playbooks https://youtu.be/JYPn5l3ChX0
Ansible playbook challenge https://youtu.be/SO-3nqAf3sY
Deploy LAMP Stack Using Ansible Playbook https://youtu.be/cyylA0Yfn2o
Tags Ansible https://youtu.be/LPdRHd4ID7c
Ansible Roles https://youtu.be/MGklkuq0-Gs
Ansible Vault https://youtu.be/RbDlfDJhQlI
Ansible Galaxy: https://youtu.be/34ycoo2T1HI
SSH vulnerabilities MAC algorithms and CBC ciphers Tech Arkit
Name: SSH Weak MAC Algorithms Enabled
Description: The remote SSH server is configured to allow either MD5 or 96-bit MAC Algorithms both of which are considered weak.
Solution: Contact the vendor or consult product documentation to disable MD5 and 96-bit MAC algorithms
Name: SSH Server CBC Mode Ciphers Enabled
Description: The SSH server is configured to support Cipher Block Chaining (CBC) encryption. This may allow an attacker to recover the plaintext message from the ciphertext
Solution: Contact the vendor or consult product documentation to disable CBC mode cipher encryption and enable CTR or GCM cipher mode encryption.
https://github.com/techarkit/Linux-For-Beginners/blob/master/Linux_Video_Tutorial.md
Download Free Books: https://arkit-in.tradepub.com/free/w_advb01/?p=w_advb01
Follow Us on Social Media
WhatsApp Group: https://bit.ly/TechArkitWhatsAppGroup
Join Telegram Group: http://t.me/linuxarkit 3000 Members Joined
Github: https://github.com/techarkit/
Facebook: https://www.facebook.com/linuxarkit
Twitter: https://twitter.com/aravikumar48
Instagram: https://www.instagram.com/arkit.co.in/
Website: https://arkit.co.in
Blog: https://techarkit.blogspot.com/
Reddit: https://www.reddit.com/r/techtutorial/
Email: aravikumar48[at]gmail.com
Quora: https://www.quora.com/q/cxfarqipmxzajyne?invite_code=eaA2xM8guZ4pBOcQwzbs
Post your topic, we will make videos for you
https://forms.gle/M4ysoMNh1zsPXiw89
#TechArkit
Ansible Course
Automation with Ansible Course https://youtu.be/-b1ByalW4X8
Ansible Lab Setup https://youtu.be/p8xkv1m-boE
Ansible Inventory configuration https://youtu.be/G7_orKIWAeA
Ansible Ad-Hoc Commands with examples https://youtu.be/Kr-62ON416c
Writing your first Ansible playbook guide https://youtu.be/2nRfP69sGsk
How to variables in Ansible playbook https://youtu.be/nOOe-_rNhP8
Conditionals and Loops of Ansible playbooks https://youtu.be/JYPn5l3ChX0
Ansible playbook challenge https://youtu.be/SO-3nqAf3sY
Deploy LAMP Stack Using Ansible Playbook https://youtu.be/cyylA0Yfn2o
Tags Ansible https://youtu.be/LPdRHd4ID7c
Ansible Roles https://youtu.be/MGklkuq0-Gs
Ansible Vault https://youtu.be/RbDlfDJhQlI
Ansible Galaxy: https://youtu.be/34ycoo2T1HI
Bugzilla Installation Centos 8
https://github.com/techarkit/Linux-For-Beginners/blob/master/Linux_Video_Tutorial.md
Download Free Books: https://arkit-in.tradepub.com/free/w_advb01/?p=w_advb01
Follow Us on Social Media
WhatsApp Group: https://bit.ly/TechArkitWhatsAppGroup
Join Telegram Group: http://t.me/linuxarkit 3000 Members Joined
Github: https://github.com/techarkit/
Facebook: https://www.facebook.com/linuxarkit
Twitter: https://twitter.com/aravikumar48
Instagram: https://www.instagram.com/arkit.co.in/
Website: https://arkit.co.in
Blog: https://techarkit.blogspot.com/
Reddit: https://www.reddit.com/r/techtutorial/
Email: aravikumar48[at]gmail.com
Quora: https://www.quora.com/q/cxfarqipmxzajyne?invite_code=eaA2xM8guZ4pBOcQwzbs
Post your topic, we will make videos for you
https://forms.gle/M4ysoMNh1zsPXiw89
#TechArkit
Ansible Course
Automation with Ansible Course https://youtu.be/-b1ByalW4X8
Ansible Lab Setup https://youtu.be/p8xkv1m-boE
Ansible Inventory configuration https://youtu.be/G7_orKIWAeA
Ansible Ad-Hoc Commands with examples https://youtu.be/Kr-62ON416c
Writing your first Ansible playbook guide https://youtu.be/2nRfP69sGsk
How to variables in Ansible playbook https://youtu.be/nOOe-_rNhP8
Conditionals and Loops of Ansible playbooks https://youtu.be/JYPn5l3ChX0
Ansible playbook challenge https://youtu.be/SO-3nqAf3sY
Deploy LAMP Stack Using Ansible Playbook https://youtu.be/cyylA0Yfn2o
Tags Ansible https://youtu.be/LPdRHd4ID7c
Ansible Roles https://youtu.be/MGklkuq0-Gs
Ansible Vault https://youtu.be/RbDlfDJhQlI
Ansible Galaxy: https://youtu.be/34ycoo2T1HI
Nano Text Editor | RHCSA 2021 | Tech Arkit
Download Free Books: https://arkit-in.tradepub.com/free/w_advb01/?p=w_advb01
Follow Us on Social Media
WhatsApp Group: https://bit.ly/TechArkitWhatsAppGroup
Join Telegram Group: http://t.me/linuxarkit 3000 Members Joined
Github: https://github.com/techarkit/
Facebook: https://www.facebook.com/linuxarkit
Twitter: https://twitter.com/aravikumar48
Instagram: https://www.instagram.com/arkit.co.in/
Website: https://arkit.co.in
Blog: https://techarkit.blogspot.com/
Reddit: https://www.reddit.com/r/techtutorial/
Email: aravikumar48[at]gmail.com
Quora: https://www.quora.com/q/cxfarqipmxzajyne?invite_code=eaA2xM8guZ4pBOcQwzbs
Post your topic, we will make videos for you
https://forms.gle/M4ysoMNh1zsPXiw89
#TechArkit
Ansible Course
Automation with Ansible Course https://youtu.be/-b1ByalW4X8
Ansible Lab Setup https://youtu.be/p8xkv1m-boE
Ansible Inventory configuration https://youtu.be/G7_orKIWAeA
Ansible Ad-Hoc Commands with examples https://youtu.be/Kr-62ON416c
Writing your first Ansible playbook guide https://youtu.be/2nRfP69sGsk
How to variables in Ansible playbook https://youtu.be/nOOe-_rNhP8
Conditionals and Loops of Ansible playbooks https://youtu.be/JYPn5l3ChX0
Ansible playbook challenge https://youtu.be/SO-3nqAf3sY
Deploy LAMP Stack Using Ansible Playbook https://youtu.be/cyylA0Yfn2o
Tags Ansible https://youtu.be/LPdRHd4ID7c
Ansible Roles https://youtu.be/MGklkuq0-Gs
Ansible Vault https://youtu.be/RbDlfDJhQlI
Ansible Galaxy: https://youtu.be/34ycoo2T1HI
Explained Hard Link and Soft Link | Tech Arkit
Hard Link |
Soft Link |
Hard linked file is assigned the same Inode value as the original. |
Soft Linked file is assigned different inode values. |
You can’t find difference between linked file and original file |
You can find the different between original and linked file |
We can’t create hard link for directories |
We can create Soft link for directories |
We can’t create hard links in different file systems (Example. Ext4 to XFS or Ext3 to Ext4). |
We can create soft links between across the file systems |
Deleting original file will not effect linked file |
Deleting Original file will make soft linked file inaccessible |
Standard Input, Output and Error Redirection | Tech Arkit
The basic work flow of any Linux command is that it takes an input and give an output.
The standard input (STDIN) device is the keyboard.
The standard output (STDOUT) device is the screen.
With redirection, the above standard input/output can be changed.
Subscribe to:
Posts (Atom)