Sponsored Content
Top Forums Shell Programming and Scripting Script that automatically issue "yes" and press enter Post 302991670 by invinzin21 on Wednesday 15th of February 2017 09:16:08 AM
Old 02-15-2017
Script that automatically issue "yes" and press enter

Team,
Got a thousand servers. I created a script to say hello on every server. But is there a script or whatever that will issue a yes on every key checking.

Code:
for i in `cat myserverlist`
do
echo $i
ssh-copy-id $i
done




The authenticity of host 'server1 (162.162.0.10)' can't be established.
RSA key fingerprint is 1:29:3b:48:d6:e2:h8:18:21:56:4d:5abf.
Are you sure you want to continue connecting (yes/no

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pressing "Enter/Space bar" using Net::TELNET? in Perl

I'm trying to learn how to get my script to execute the enter button when it telnets into a router and the router displays output but you need to press the space bar or enter button to continue displaying my output of the router. How is this done? (0 Replies)
Discussion started by: xmaverick
0 Replies

2. Shell Programming and Scripting

"Write" - how to quit by press enter

I need to make Bash script. It has one parameter - user ID. If this user is online you can write him a message with "write" program, but only one line. After pressing ENTER "write" program should quit. Normally when you run "write" you can write next line after pressing ENTER and you can quit... (0 Replies)
Discussion started by: Eriknem
0 Replies

3. Shell Programming and Scripting

read -n1 -r -p "Press..." key / produces error in bash shell script

Hello! Sorry, for my not so perfect english! I want to stop bash shell script execution until any key is pressed. This line in a bash shell script read -n1 -r -p "Press any key to continue..." key produces this error When I run this from the command line usera@lynx:~$ read... (4 Replies)
Discussion started by: linuxinho
4 Replies

4. Shell Programming and Scripting

Make scipt except from "Y","y" and "yes" to take [Enter] as being "yes"

This is the script: #!/bin/sh if ; then rm -rf /usr/share/WallpaperChanger; fi if ; then rm -rf /usr/bin/wallch; fi; if ; then rm -rf /usr/share/applications/wallch.desktop; fi if ; then rm -rf /usr/share/doc/wallch; fi if ; then rm -rf /usr/share/man/man1/wallch.1.gz; fi echo "Delete... (4 Replies)
Discussion started by: hakermania
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

""Help Me!""Beginner awk learning issue

Hi All, I have just now started learning awk from the source - Awk - A Tutorial and Introduction - by Bruce Barnett and the bad part is that I am stuck on the very first example for running the awk script. The script is as - #!/bin/sh # Linux users have to change $8 to $9 awk ' BEGIN ... (6 Replies)
Discussion started by: csrohit
6 Replies

7. Shell Programming and Scripting

Syntax error near unexpected token `"Hit <ENTER> to continue:"'

the below code will search attr string inside makefile under the modelno on given path. echo "Enter model no for searching string inside makefile" read inputs2 #find /pools/home_unix/sapte/work/models/model/$inputs2 -name "makefile" | xargs grep "attr" \; #;;I am getting below error.... (7 Replies)
Discussion started by: lathigara
7 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
dropbearkey(8)						      System Manager's Manual						    dropbearkey(8)

NAME
dropbearkey - create private keys for the use with dropbear(8) SYNOPSIS
dropbearkey -t type -f file [-s bits] [-y] DESCRIPTION
dropbearkey generates a RSA or DSS format SSH private key, and saves it to a file for the use with the dropbear(8) SSH 2 server. Note that some SSH implementations use the term "DSA" rather than "DSS", they mean the same thing. OPTIONS
-t type Type of key to generate. Must be one of rsa or dss. -f file Write the secret key to the file file. -s bits Set the key size to bits bits, should be multiple of 8 (optional). -y Just print the publickey and fingerprint for the private key in file. EXAMPLE
generate a host-key: # dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key extract a public key suitable for authorized_keys from private key: # dropbearkey -y -f id_rsa | grep "^ssh-rsa " >> authorized_keys AUTHOR
Matt Johnston (matt@ucc.asn.au). Gerrit Pape (pape@smarden.org) wrote this manual page. SEE ALSO
dropbear(8), dbclient(1) http://matt.ucc.asn.au/dropbear/dropbear.html dropbearkey(8)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy