05-31-2005
Quote:
Originally Posted by dmilks
Thanks. If I open a Putty session and logon to the server where the KSH script runs from, and type in "ping mgftp01", it does nothing - it just hangs. I know the server is up because I can logon to it. However, maybe I just don't understand all the options of the PING command. Can you point me in the right direction?
Also, is it possible to have a server not accept incoming PING requests?
Thanks again,
- Dylan
Hi !
Well... depening on the firewall, the server may ignore all or part of the ICMP signals and, probably, this is your case.
About what you want... I don't know a simple solution for this... but, don't you have some other services on the server ? somethin that doesn't require a username and a passowrd... like finger or http... if you do, you can make a script or something that will check if it can connect to the server on the specified port and if it can, you can run your command ;-)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: ajith_tg
1 Replies
2. Shell Programming and Scripting
Hi all,
I'm writing a script that chooses the best computer available in an open lab. The script works great except every now and then there is a dead computer in the lab that begins the ssh handshaking, but freezes after the following:
debug1: Offering public key:
When the script happens... (2 Replies)
Discussion started by: x-375HK-x
2 Replies
3. Shell Programming and Scripting
I need a bit of help here on something simple.
I have a KSH script (must be KSH) that needs to change 2 positional variables in a CSV script.
The CSV script looks like this:
00001,010109,01/01/2009 00:01:01
00008,090509,09/05/2009 13:47:26
My AWK script will change $2 and $3 based... (4 Replies)
Discussion started by: kretara
4 Replies
4. Shell Programming and Scripting
I have a box that has to start dhcpd when a certain connection is down and stop the dhcpd when the connection is up again. I would appriciate any help making this script:
From server A:
ping server B
if connection is ok then do nothing
if connection is not ok then start dhcpd
until... (8 Replies)
Discussion started by: KimJensen
8 Replies
5. Shell Programming and Scripting
Hi all,
Im new at scripting and i need to run a few commands at work every hours so i decide to make a script but on 1 of the steps i have a the follwoing problem:
The command i do is this:
#!/bin/bash
ssh root@asdasd001 'mysql -h A-db-1 -uroot -password --execute "show slave status"'... (3 Replies)
Discussion started by: Aparicio
3 Replies
6. Shell Programming and Scripting
I have a script that does db query in postgres. I'm trying to put in some error checking in the script. I keep running into the password prompt problem where when invalid credentials/or database is put it, it would prompt me for a password which hangs the script. Is there a way that I can check for... (0 Replies)
Discussion started by: zerofire123
0 Replies
7. Shell Programming and Scripting
Used the script posted on forum - unix.com/shell-programming-scripting/21597-script-change-passwords-same-user-multiple-servers.html but the last question posted on this seems to be still unanswered, tried different things with no success, can someone help giving an way to pass the password via... (5 Replies)
Discussion started by: sapadmin
5 Replies
8. Shell Programming and Scripting
Hi all,
I need ssh in shell script. My requirement is:
- Take user_name and password from user (in PHP)
- Pass this to shell script which will:
- connect via ssh
- Run sql query
- Pass the results back in PHP
- Put the results to website.
I know PHP has libraries for ssh and ftp, but... (3 Replies)
Discussion started by: shekhar2010us
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I'm trying to access to FTP SERVER over SSL with this script unix :
(credentials are correct)
#!/usr/bin/ksh
USER="test"
PASSWORD="pwdtest"
IP="**.***.*.***"
ftp -s $IP 990 << EOF >>log_ftp
user $USER $PASSWORD
bin
passive
EOF
but seems that credentials are not passed... (2 Replies)
Discussion started by: nash83
2 Replies
10. UNIX for Beginners Questions & Answers
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)
Discussion started by: sreeram4
3 Replies
LEARN ABOUT SUSE
nns_server
nameserv::server(n) Name service facility nameserv::server(n)
__________________________________________________________________________________________________________________________________________________
NAME
nameserv::server - Name service facility, Server
SYNOPSIS
package require Tcl 8.4
package require nameserv::server ?0.3.2?
package require comm
package require interp
package require logger
::nameserv::server::start
::nameserv::server::stop
::nameserv::server::active?
::nameserv::server::cget -option
::nameserv::server::configure
::nameserv::server::configure -option
::nameserv::server::configure -option value...
_________________________________________________________________
DESCRIPTION
Please read Name service facility, introduction first.
This package provides an implementation of the serviver side of the name service facility queried by the client provided by the package
nameserv. All information required by the server will be held in memory. There is no persistent state.
This service is built in top of and for the package comm. It has nothing to do with the Internet's Domain Name System. If the reader is
looking for a package dealing with that please see Tcllib's packages dns and resolv.
This server supports the Core protocol feature, and since version 0.3 the Search/Continuous feature as well.
API
The package exports five commands, as specified below:
::nameserv::server::start
This command starts the server and causes it to listen on the configured port. From now on clients are able to connect and make
requests. The result of the command is the empty string.
Note that any incoming requests will only be handled if the application the server is part of does enter an event loop after this
command has been run.
::nameserv::server::stop
Invoking this command stops the server and releases all information it had. Existing connections are shut down, and no new connec-
tions will be accepted any longer. The result of the command is the empty string.
::nameserv::server::active?
This command returns a boolean value indicating the state of the server. The result will be true if the server is active, i.e. has
been started, and false otherwise.
::nameserv::server::cget -option
This command returns the currently configured value for the specified -option. The list of supported options and their meaning can
be found in section OPTIONS.
::nameserv::server::configure
In this form the command returns a dictionary of all supported options, and their current values. The list of supported options and
their meaning can be found in section OPTIONS.
::nameserv::server::configure -option
In this form the command is an alias for "::nameserv::server::cget -option]". The list of supported options and their meaning can
be found in section OPTIONS.
::nameserv::server::configure -option value...
In this form the command is used to configure one or more of the supported options. At least one option has to be specified, and
each option is followed by its new value. The list of supported options and their meaning can be found in section OPTIONS.
This form can be used only if the server is not active, i.e. has not been started yet, or has been stopped. While the server is
active it cannot be reconfigured.
OPTIONS
The options supported by the server are for the specification of the TCP port to listen on, and whether to accept non-local connections or
not. They are:
-localonly bool
This option specifies whether to accept only local connections (-localonly 1) or remote connections as well (-localonly 0). The
default is to accept only local connections.
-port number
This option specifies the port the name service will listen on after it has been started. It has to be a positive integer number (>
0) not greater than 65536 (unsigned short). The initial default is the number returned by the command ::nameserv::server::com-
mon::port, as provided by the package ::nameserv::server::common.
HISTORY
0.3 Extended the server with the ability to perform asynchronous and continuous searches.
0.2 Changed name of -local switch to -localonly.
0.1 Initial implementation of the server.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category nameserv
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO
nameserv::client(n), nameserv::common(n)
KEYWORDS
name service, server
COPYRIGHT
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
nns 0.3.2 nameserv::server(n)