Ssh to validate multiple remote hosts connection validation.
Dear Folks,
I am trying to read a config file contains ip and port numbers.
i want to read each line of the config file and check ssh connection is happening or not.
Kindly guide.
Config file:
Kindly help, it is checking only for one ip, rest is not passing as an argument.
Regards,
sadique
Last edited by Don Cragun; 02-18-2018 at 05:36 AM..
Reason: Remove "CODE : " in CODE tags.
Hello all,
I connect usually to one enviornment "dev" daily and then ftp some files to some other enviorment "uat" and then login to "uat" and run some scripts to process these files.
I was thinking to automate the process, where running one script from "dev" will complete all task required... (11 Replies)
Hi,
I am new to Shell Scripting. Can anybody help me in writing a Script Which Could Login from a Unix box to a Remote Unix box which accepts the user credentials automatically and display the result for checking the Disk Space Utilisation (Without running any SSH agent). (1 Reply)
Hi im trying to write a script to logon to list of servers with same userID. I have no option/plan to implement ssh-keygen sharing between the systems, so i have written script creating 2 files,
file1 holds list of hosts
host1
host2
host3
file2 has following script
for i in `cat file1`... (1 Reply)
I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Hi There,
I have a file contaning some 100 servers names one by one the file called redhat_servers.txt
I want to prepare a script where it should give me the host name and kernal version.
I wrote like this,
#!/bin/bash
while read line
do
ssh $line "uname -nr"
done <... (3 Replies)
Hi guys - I am having a hard time trying to figure how to search for a certain string on config files hosted on multiple hosts.
This is an example:
Hostnames: myhost1.mycompany.com|myhost2.mycompany.com|myhost3.mycompany.com
String to search for: myipaddress.somehost.com
Directory... (9 Replies)
Hello,
I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out.
I am specifically facing issues while running for loops.
I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Hi,
I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not...
I have .sh script like below and i have servers.txt contains all the list of servers
#/bin/bash
for host in $(cat... (3 Replies)
Hello all,
i'm trying to create a report by greping a pattern on multiple remote hosts and creta a simple report,
actually i did this, is ther any better way to do this.
#!/bin/bash
for host in `cat RemoteHosts`
do
ssh $host -C 'hostname 2>&1; grep ERROR /var/log/WebServer.log.2019-09-21... (0 Replies)
Hi all,
i'm trying to gether multiple pattern on remote hosts, and trying to print hostname and the pattern,
ssh remoteserver1 -C 'hostname 2>&1;cat /var/log/server1.log | awk -F ";" '"'"'{ print " "$2" "$5}'"'"'| sort | uniq -c | sort -g -r '
The output is the following,
remoteserver1
... (8 Replies)
Discussion started by: charli1
8 Replies
LEARN ABOUT DEBIAN
dnetcat
dnetcat(1) User Commands dnetcat(1)NAME
dnetcat - opens a DECnet connection
SYNOPSIS
dnetcat {-h|--help}
dnetcat [-v] [-z] node[::|[::] ]object
dnetcat [-v] [-f] -l object
DESCRIPTION
dnetcat is a netcat(1) like tool that opens a DECnet connection and copies all data between the standard input/output to/from the socket.
OPTIONS -v
Be verbose. Prints useful (debug) messages.
-z
Zero IO mode. In this mode a connection is dropped directly after it is opened. This can be used to scan if the remote side listens on the
given address and object.
-l
Listen mode. In this mode dnetcat accepts connections on the given object.
-f
Fork on new connection. This let netcat accept multiple connections in listen mode. This is ignored if -l is not given.
--help, -h
Prints a small help.
EXAMPLES
This program can be used as 'ProxyCommand' for ssh(1). You may use it via command line like this:
ssh -o 'ProxyCommand dnetcat %h ssh' [...] mynode
or you may use it in your ~/.ssh/config like this:
Host *::
ProxyCommand dnetcat %h ssh
This will enable you to connect to any DECnet node by adding "::" at the end of the node name like this:
ssh mynode::
For more information on ssh(1) see it's manpage.
SEE ALSO ssh(1), netcat(1).
AUTHORS
This program is written by Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>.
dntools September 2008 dnetcat(1)