Software :: Bash Script Recording Remote Host Output?

Jul 19, 2010

i want to dial businesses and record a response from the person. i use a bash script to call then and go through the progress of getting through the menu. then i want to record the response of the person on the phone.

got the dialing rocking and don'tk wn much after that.

View 4 Replies


ADVERTISEMENT

General :: Bash Script That Read From File And Ping Remote Host

Feb 13, 2011

Q=What will this do?
A=This will read from /root/Desktop/iplist (or anywhere you want to put the list) after it reads the ip it will ping the ip two times. If the remote host is up then it will write the ip to a log. If the ping fails it will display it on the screen, write the ip to syslog so that you can do remote logging, and last it will send the ip by email to a user or a group of users.

Code:
#!/bin/bash
#wrote by Zach Underwood feb-12-2011
#test and wrote on centos 5.5 with sendmail
rm -f /root/Desktop/iplog #This will remove the good iplog
exec 9</root/Desktop/iplist #put full path the file where ip list is. Make sure that the ips are listed one per line.
while read -u9 ip
do
ping -c 2 $ip > /dev/null 2> /dev/null # ping and discard output
if [ $? -eq 0 ]; then # check the exit code
echo "$ip is up" >> /root/Desktop/iplog #write the ip of the hosts that are up
else
echo "$ip is down" # will show on the screen the ips that are not up
logger -p auth.notice "$ip is down" # will write the down host to syslog
echo "$ip is down" | mail -v -s alert user@anydomain.com > /dev/null 2> /dev/null #will send mail users about host down
fi
done

View 3 Replies View Related

General :: Why Can't 'scp' From Remote To Local Host

May 31, 2011

I am having difficulty sending files from a remote machine to local one using

Code:
scp
. It is working the other way however. local > remote. I am using the verbose options

[code]....

View 3 Replies View Related

Fedora Networking :: Can't Connect Via A Remote Host To Ssh?

Feb 5, 2009

have fedora 10 and am having problems with ssh. For some reason I can't connect via a remote host to my ssh. Local network connections do work just fine. I have been looking for a log of what is going on but have not had luck seeing anything.Things I have tried:

-Modify hosts.allow to allow ssh to all
-generated rsa1 key identity tryed specifying that with the -i option on the guest computer

[code]...

View 1 Replies View Related

General :: FTP From Remote Host To Local System?

Sep 27, 2010

I'm using Windows XP. I'm connecting to a UNIX box using putty SHH(ksh). Now I want to copy a text file present in remote host to my local system.

View 5 Replies View Related

General :: Remove Files In Remote Host Using Ssh?

May 25, 2011

I need to delete all files inside remote directory using ssh P.S. The directory must not be deleted, so @Wes answer is not what I need. If it would be local dir, I would run "rm -rf dir/*"

View 4 Replies View Related

General :: How To SSH Into Remote Host Hidden Behind NAT Router

Jun 21, 2011

I can use TeamViewer to get into this remote host. It has sshd running. I would like to ssh to it. But it gives the system's IP as 192.168.xx.yy. How do I ssh into it?

View 1 Replies View Related

General :: How To Monitor Remote Host Using Nagios

Jan 14, 2011

Yesterday i install nagios, after that i can successfully monitor my local machine disk usage and its services, but now i want to monitor remote host, but have no idea how to do this , i also google alot but not getting resource full explanation.so please guys tell me how can i monitor the remote host using nagios..

View 54 Replies View Related

Networking :: Fedora 10 - Unable To Ssh Out From Box To Remote Host?

Apr 10, 2009

I have a box (boell) running Fedora 10 sitting behind a firewall at school. I am able to freely ssh to and from this box to other computers (minion) within that lan. Outside of this network I cannot directly ssh to boell - I must ssh first to minion, then I can ssh to boell. I've spoken with the sysadmin and he's verified that the firewall permits ssh freely - i haven't had any issues like this with other boxes of mine there, so this isn't any surprise.

I have verified that the hosts.deny file is blank, iptables permits ports 22 (and 80) and I didn't see anything obvious in the sshd_config. I tried a tcp dump on the external host and boell while attempting to ssh from the former to boell. The packets appear to be acknowledged by boell, but this fails to lead to a connection. I've tried this process with external hosts in different locations with the same result. I have made few modifications to the default installation for F10, so perhaps there is some default somewhere I have to change. In any case, below I have attached excerpts of germane files.

======== ssh from boell =======
[root@boell log]# ssh -vvv 71.189.5.67
OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config

[code]....

View 3 Replies View Related

Networking :: Udp Client Not Working From Remote Host?

Apr 17, 2010

i have a udp server running at port 60178. when i connect to it from localhost there is no problem. when i use the client from a remote host i am not able to connect. I changed my server firewall settings[Fedora 11] and added "udp 60178" to trusted ports but still nothing happened. I ran wireshark and observed that packets are coming to the server machine but server returns a "Port Unreachable" ICMP message and doesnt give the packet to the application.

View 3 Replies View Related

General :: Way To Start Script At Remote Host

Nov 13, 2010

I want to start a shell scripts(which generate traffic to test my network) at remote linux hosts from single linux local host.. If i start script at remote host through ssh, all traffic are sending from my local host also. It will create burden on my local host. If i terminate SSH connection, it stopping the script at remote host. Also i need to do ssh to all my remote hosts.

Is there any best way to do it?

View 6 Replies View Related

General :: Sending Application Log To Remote Host?

Feb 25, 2011

How is it done?Right now its just getting written in a local text file(not /var/../.., not using syslog at all).and every day a new file is being created

View 3 Replies View Related

Server :: Unable To Connect To Remote Host

Jun 4, 2011

I installed dovecot on my server and now the imap and pop3 ports are open.But when I want to telnet it, it's not possible.Code: Trying 127.0.0.1...telnet: Unable to connect to remote host: Connection timed out.Also I can't any ports else. But I can connect to it from other computers. I tried to connect to this from my PC and it was successful.

View 7 Replies View Related

Software :: Nagios Adding Remote Host?

Mar 2, 2011

i have some problem with nagios adding remots hosts in localhost.cfg (/etc/nagios/objects/localhost.cfg) file in that i am able to only one remote host if i add one more host in that file i got below error #/usr/sbin/nagios -v /etc/nagios/nagios.cfg

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

[Code]...

View 7 Replies View Related

Programming :: Accessing Server From Remote Host?

Mar 2, 2011

i have made a java web server which works on localhost.but now i want to capable it handling many clients at a time.so clients running on different computer need machine name or IP address of server computer.How can i do this in java?

View 1 Replies View Related

Slackware :: Remove Ip Address From Remote Host?

Apr 16, 2010

If I have a dnsmasq server and it dished out a IP address that I don't want it to and it still gives it to my machine no matter how many times I restart windows and issue ipconfig /renew|release or enable/disable the adapter, how do I force it to give my windows machine an IP I want it to have?

The only way I've accomplished this in the past is by rebooting my slackware system.

View 10 Replies View Related

Programming :: Script To Find Local IP - Output Unknown Host

Nov 24, 2010

I want to find out my IP and I test this code from beej tutorial:

Code:
char hostname[128];
int i;
struct hostent *he;
struct in_addr **addr_list;
struct in_addr addr;

gethostname(hostname, sizeof hostname);
printf("My hostname: %s
", hostname);
he = gethostbyname(hostname);
if (he == NULL) { // do some error checking
herror("gethostbyname"); // herror(), NOT perror()
return 1;
} // print information about this host:
printf("Official name is: %s
", he->h_name);
printf("IP address: %s
", inet_ntoa(*(struct in_addr*)he->h_addr));
printf("All addresses: ");
addr_list = (struct in_addr **)he->h_addr_list;

for(i = 0; addr_list[i] != NULL; i++) {
printf("%s ", inet_ntoa(*addr_list[i]));
}
printf("
");
return 0;

But my output is this:
Code:
My hostname: vBx
gethostbyname: Unknown host

I heard that it works in windows, why isn't working in linux?

View 1 Replies View Related

Fedora Security :: Redirect Auditd Log To Remote Host?

Sep 17, 2009

way to redirect the audit daemon message to a remote host I checked the auditd.conf and it's man page and find that the log location is specified by the line log_file = file_path and in the man page

Quote:

"log_file: This keyword specifies the full path name to the log file where audit records will be stored. It must be a regular file."

does this mean that the auditd does not have the function to redirect the logs to a remote hosts.

View 4 Replies View Related

General :: Command To Find The OS Version Of Remote Host?

Dec 29, 2010

I'm in a situation, that I have no access to one of my remote server. And I CAN'T EVEN INSTALL ANY SOFTWARE in any linux boxes to determine the remote OS name and version.Can you please enlighten me on how could I find out the OS version of remote host without installing any software or without login to that server.

View 1 Replies View Related

Software :: Lpr - Can't Connect To Remote Host - 127.0.0.1 - Connection Refused

Mar 26, 2011

lpr: can't connect to remote host (127.0.0.1): Connection refused

[root@l-GZ:/]# usb 1-1: new full speed USB device using sl811-hcd and address 3

View 2 Replies View Related

Software :: Xlib - Run A Graphical Application At A Remote Host ?

Dec 21, 2008

When trying to run a graphical application at a remote host i get the error

Xlib: 'connection to ":0.0" refused by server'

Xlib: No protocol specified

How to address this?

View 1 Replies View Related

CentOS 5 :: Lower Security On Tftp So That Remote Host Can Do Gets

Jun 10, 2009

I was able to install and start tftp.I can tftp localhost and get a file, even from a non-administrator login.I can connect from a remote host, but the *get* times out.I suspect there is a security issue. Can you tell me how to lower the security on tftp so that a remote host can do gets?

View 4 Replies View Related

CentOS 5 :: Ssh_exchange_identification: Connection Closed By Remote Host?

Feb 3, 2011

I am having trouble connecting to one of the VM's through ssh from base machine all of a sudden. All I get is an error : ssh_exchange_identification: Connection closed by remote host

--IP/Hostname crossed out --
[root@XX-XX02 ~]# ssh -v 1XX.1X.5X.1XX
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008[code].....

Saying that the problem is only with ssh would be wrong as I can't seem to telnet or ftp it either. But I can ping it fine.When I try to login to that VM through console, it won't even let me login. The screen would flash for a sec and the same login prompt would reappear. I am not sure what exactly happened as it was working fine before.

OS version: CentOS release 5.5 (Final)
uname -a: Linux XX.XX 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:50:31 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

View 6 Replies View Related

Networking :: Recovering The Remote Ssh Output?

Jun 30, 2010

I had logged into a remote server through ssh and was runing some rsync commands on the server. Rsync was outputting information in the ssh cli when the client machine (the machine I was using) crashed because of an unrelated issue. Normally, if, say I'm are downloading something with wget, I usually output the info to a log file and then I can simply tail that file later. But what if I'm not using a log file? Is there any way to later log back in to a system via ssh and resume the output I previously had?

View 5 Replies View Related

Fedora Security :: The DNS Server Discloses The Remote Host Name - Can This Be Turned Off

Jun 15, 2010

We recently had a vulnerability scan done on our network and one of the vulnerabilities was that the dns server discloses the remote host name when using hostname.bind.

Is there any way that we can stop this from happening? Our name server is a Fedora 11 machine.

View 2 Replies View Related

Ubuntu Security :: Host Always Ask Password On 1st Remote Desktop (VNC) Access

Dec 30, 2010

host always ask password on 1st remote desktop (VNC) access Desktop version... how can I disable this?

View 2 Replies View Related

Ubuntu :: Execute Long Running Jobs On A Remote Host?

Apr 1, 2011

What you do if the job takes a long time to finish and you don't want to wait.Say, I ssh to a remote server from my laptop and start a long-running job. Then few hours later I ssh again and inspect how did job run, its uotput and etc.

View 2 Replies View Related

Ubuntu Servers :: Cannot Access MySQL Database From Any Remote Host

Apr 15, 2011

I can not access my MySQL database from any remote host on my home network, I keep getting "Access denied for user 'dbuser'@'192.168.1.10' (using password: YES)"

From what I've read this seems to be a permission problem, I tried

'dbuser'@localhost';
'dbuser'@'%';
'dbuser'@'192.168.1.10';

and between each change of permission, I've flushed privileges.

View 1 Replies View Related

Ubuntu Networking :: Ssh_exchange_identification: Connection Closed By Remote Host

Jun 15, 2011

i try to connect to a specific ip address with ssh i have installed the ssh server and client. i also try it by connecting with localhost without any problem. But i keep taking this message if to try to connect to the ip address. i checked my hosts.allow and hosts.deny files and all are commented in there (i think tha this should not be the problem).

View 2 Replies View Related

Red Hat / Fedora :: SSH To Remote Host (Port 2022) Cannot Login Directly

Mar 7, 2011

Our requirement is not to use the default SSH port, So I have edited /etc/ssh/sshd_config file and changed the default port 22 to 2022, and I have restarted the sshd daemon. Now port 2022 is open in all servers however when I ssh to the remote hosts I cannot login directly. I have to use the below command to connect to the remote server, I don't want to provide SSH port number info while login to remote servers, How to achieve this.
ssh -p 2022 server02

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved