Тёмный

Shell Script to run commands on remote servers | ssh -t & -T option | ssh basic key based auth setup 

Pedagogy
Подписаться 6 тыс.
Просмотров 11 тыс.
50% 1

Hello guys , this video is about creating a shell script that can be used to run commands on remote servers. I started with explaining the basic setup for ssh key based authentiction. This is needed to ensure that we can connect to remote servers without any prompt for password. After that , I pointed out the .hushlogin file usage that can be used to remove messages while login to ssh. Next , I created a basic shell script to run the commands in remote servers . At end , I explained the meaning of -t and -T option in ssh that are used for allocation of pseudo terminal and to disable pseudo terminal allocation with some examples.
Topics covered in this video are :
- shell script to run commands on remote servers
- basic ssh setup for key based authentication to remote servers
- ssh -t and -T optons
- ssh login to remote servers
- disable message on login with ssh
- .hushlogin file in linux
- ssh command in shell scripting
#ssh #remote #servers #shell #script
__________________________________________________________
🌻 Support me with 🌻:
Join : / @pedagogyv
Patreon : / pedagogy
__________________________________________________________
👀 Connect with me on 👀 :
Telegram : t.me/vpedagogy
Instagram : / vikramsingh100998
LinkedIn : / vikram-singh-0b3712178
Facebook : / vikramsingh100998

Опубликовано:

 

28 дек 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@Aryabarta-ghxy
@Aryabarta-ghxy 3 месяца назад
Excellent information!
@kelvintan857
@kelvintan857 Год назад
Hi lecturer, Thanks for your video. I really learn something from you.
@jlone1378
@jlone1378 2 года назад
Thank you man
@pravi71
@pravi71 2 года назад
When we type top as one of the commands to be passed to ssh in here document, despite using -t and -T, why is it not working?
@PedagogyV
@PedagogyV 2 года назад
can't say at this moment . will have to check. may be due to top being interactive command like nano . can you try giving top as top -b -n 1
@ishurajbarsainya169gmailcom
@ishurajbarsainya169gmailcom 2 года назад
Thankyou brother
@gouravsaini7446
@gouravsaini7446 2 года назад
Hi, Vicky Thank you so much for this video, Also I want to write the config file which I'll define as per the list of servers. I don't know in which way I can give the hosts info in the configuration file and then my shell script will login to each server using loop and read a specific file. Can you make a video to create the configuration file in all the ways?
@PedagogyV
@PedagogyV 2 года назад
I'll advice you to go with ansible. For multiple servers ansible is best to use and its easy to learn for this purpose. I just explained here basics but best will be to go with ansible.
@simantachoudhury4543
@simantachoudhury4543 2 года назад
If the server having password then how can we proceed..
@PedagogyV
@PedagogyV 2 года назад
serverfault.com/questions/241588/how-to-automate-ssh-login-with-password this will help
@thanoswasright626
@thanoswasright626 Год назад
Which machine does the script need to be on? the host or the servers?
@PedagogyV
@PedagogyV Год назад
ofcourse host.. you should see ansible also for these things . Its better to use ansible .
@mahadeoraut1471
@mahadeoraut1471 2 года назад
It helped me alot. How I can pass variable to remote server script.!
@PedagogyV
@PedagogyV 2 года назад
elaborate pls
@mahadeoraut1471
@mahadeoraut1471 2 года назад
@@PedagogyV I have a script on remote server.I'm able to run script(contain only command) remotely.Now my requirement is to pass some input variable to the script from remote.
@mahadeoraut1471
@mahadeoraut1471 2 года назад
Script is echo "enter any date like YYYY-MM-DD" read a echo "enter string which want to grep" read b I have to pass variable a and b to remote server.
@PedagogyV
@PedagogyV 2 года назад
@@mahadeoraut1471 stackoverflow.com/questions/51946970/bash-how-to-pass-variable-to-the-remote-bash-script you can read locally and then pass it to remote to..ping me in telegram if it doesn't work
@vijaypandav885
@vijaypandav885 2 года назад
Script plz
Далее
How SSL certificate works?
6:30
Просмотров 761 тыс.
Linux File System/Structure Explained!
15:59
Просмотров 4 млн
PHP in 100 Seconds
2:21
Просмотров 1,3 млн