09-04-2009
Thanks; but this only works for the first server in the list...any suggestions to make it workable for all the servers in the file? And if I remove '/' from /tmp/an.log then scp works for all servers but ssh only works for the first server in the list
while read host
do
scp bk2.sh $host:/ora/rman/scripts/bk2.sh 2>/dev/null
ssh $host /ora/rman/scripts/bk2.sh 2>/dev/null >> /tmp/an.log
done < /export/home/oracle/server.lst
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi!
Im trying to use host.allow & host.deny to resrtic access to my sun machine, but it doesnt seem to work... I want to allow full access from certain IPīs (ssh,http,ftp,etc...) but deny all kind of conections from outsideworld, the way that im doing that is:
hosts.allow
ALL:127.0.0.1... (2 Replies)
Discussion started by: Sorrento
2 Replies
2. UNIX for Dummies Questions & Answers
Hello everyone,
This is my first posts and I did search for a questions but did not find a question that answered my question unless of course I overlooked it.
I'm running Solaris 8. I use ssh for the users but I have a user called "chatterbox" that uses telnet but I need for chatterbox to... (1 Reply)
Discussion started by: huddlestonsnk
1 Replies
3. Shell Programming and Scripting
We have two servers , one is mount to another server , I am worry if the server is unstable , the connection ( mount ) will be broken , or when the server is rebooted , the connection will also be broken , can advise how can I make sure the mount is establish , can advise if I want to do the below... (1 Reply)
Discussion started by: ust
1 Replies
4. Shell Programming and Scripting
Hello all,
I currently connect to several servers multiple times a day. Most of the time I connect via SSH through the terminal emulator poderosa (my personal favorite), but sometimes I connect via telnet through xstart because I need it to export a GUI.
What I want to do is add something to... (3 Replies)
Discussion started by: DeCoTwc
3 Replies
5. AIX
Where do i check how many connection a same user name can make to a UNIX/AIX system.
for examples
root login from local physical machine
root login from LAN via telnet at the same time
root login from internet via telnet also at the same time..
where do i check and how do i change this ?
... (3 Replies)
Discussion started by: dplinux
3 Replies
6. Solaris
Hi everyone,
I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies
7. AIX
hi all
just installed the netsec.options.tcpwrapper from expansion pack, which used to be a rpm, for my aix 6.1 test box.
it is so unpredictable. i set up the hosts.deny as suggested for all and allow the sshd for specific ip addresses/hostnames.
the tcpdchk says the hosts allowed and... (0 Replies)
Discussion started by: wf201626
0 Replies
8. UNIX for Dummies Questions & Answers
i have about 3500 hosts/devices which i monitor.
i monitor them from one host. we'll call this one host HOSTA. HOSTA has connectivity to all 3500 hosts/devices.
now, i have to create a backup for HOSTA. and the back up is in another state.
how do i get a list of all open ports on HOSTA so... (1 Reply)
Discussion started by: SkySmart
1 Replies
9. Shell Programming and Scripting
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:
abc@1.2.342 22
abc@1.2.343 22
abc@1.2.344 22
abc@1.2.345 22... (9 Replies)
Discussion started by: sadique.manzar
9 Replies
10. Solaris
Am trying to copy a tar file onto a series of remote hosts and untar it at the destination. Need to do this without having to do multiple ssh.
Actions to perform within a single ssh session via shell script
- copy a file
- untar at destination (remote host)
OS : Linux RHEL6 (3 Replies)
Discussion started by: sankasu
3 Replies
tsql(1) FreeTDS Utilities tsql(1)
NAME
tsql - utility to test FreeTDS connections and queries
SYNOPSIS
tsql { -S servername [-I interface] | -H hostname -p port }
-U username [-P password] [-o options]
tsql -C
DESCRIPTION
tsql is a diagnostic tool provided as part of FreeTDS. It uses the TDS protocol directly to connect to Sybase or Microsoft SQL Servers, and
allows the user to issue queries that test the capabilities of FreeTDS.
tsql is *not* a replacement for a complete isql, such as sqsh (www.sqsh.org). It is designed to rely on the lowest level FreeTDS library,
tdslib, as a way to isolate potential bugs in the protocol implementation.
tsql can be run in two ways, one which uses the freetds.conf and one which connects directly using the server's hostname and port.
When -S is used, FreeTDS uses the freetds.conf (or equivalent) and environment variables in the normal way to determine the server's ip
address and port. You can use -I to specify a filename, overriding FreeTDS's configuration file search algorithm.
The -H and -p parameters are provided especially for troubleshooting new configurations (or servers). Use of these parameters causes
FreeTDS to ignore any freetds.conf and environment variables.
OPTIONS
-S servername
the Database Server to which to connect.
-I interface
a freetds.conf or interfaces file describing servername
-H hostname
the DNS hostname of the server
-p port
the port at which SQL Server is listening
-U username
database login name. If username is not provided, a domain login is attempted for TDS 7+ connections.
-P password
database password.
-L list server "instances" (with -H)
-C prints some of the compile-time configuration parameters.
-o options
apply the options specified to every command.
f No footer [result count]
h No header [titles]
t Print time
v Print version
q Quiet
NOTES
Typing "exit", "quit", or "bye" (or ^D) exits tsql.
Typing "version" displays the TDS protocol version.
Command batches may be separated with "go" or "GO". If "GO", the version string is reported before executing the batch.
After prompting for the password, tsql will attempt to connect to the remote
server.
tsql displays a counter indicating the number of seconds that
it is attempting to connect.
Typically, tsql should immediately respond
with a '1>' prompt.
If you see the counter (1, 2, 3, ...), most likely tsql is unable to connect to the indicated server.
If you can connect with "tsql -S servername", your basic FreeTDS installation is working.
If you have suggestions for ways to make tsql more useful as a diagnostic tool, please recommend them to the FreeTDS mailing list for con-
sideration.
HISTORY
tsql first appeared in FreeTDS 0.60.
AUTHORS
The tsql utility was written by Brian Bruns.
BUGS
Several, to be sure, now that it's documented. :)
doc 13 November 2011 tsql(1)