connect to server using ssh


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers connect to server using ssh
# 1  
Old 07-27-2007
connect to server using ssh

hi,

i have script that connects to a unix server. however, i want to add condition that if it cannot connects in 10 attemps, it will send email to me.

while [ condition ] -a ${COUNT} -lt 10]
./connect to server.
if status <> 0 then
email to me.

fi


Thanks a lot.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Required - facing error when trying to connect to a mysql by ssh to another server

Hi i am new to unix shell scripting i have the below requirement connect to server B and then connect to mysql in the server B and query for a particular record and capture that value but when i perform this i am facing an error can u guys help me on this:confused::confused: ... (2 Replies)
Discussion started by: Hamdul
2 Replies

2. Linux

How to connect Linux server (configure two way authentication) with Windows server?

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (0 Replies)
Discussion started by: manjusharma128
0 Replies

3. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

4. Red Hat

Xming Vs ssh connect to RHEL server from Windows machine

I am able to connect a RHEL server from my Windows machine using Putty (via ssh). My question is what is the advantage of using Xming instead of Putty? Is it that Xming would enable a graphical connect from the Windows machine to RHEL server? I hope my question is clear that what is the... (9 Replies)
Discussion started by: RHCE
9 Replies

5. Linux

Generate public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (0 Replies)
Discussion started by: sridhardwh
0 Replies

6. Red Hat

unable to connect remote server using ssh

hi all i am unable to connect remote server using ssh but i am able to ping the server ssh service is running. (5 Replies)
Discussion started by: nikhil kasar
5 Replies

7. Shell Programming and Scripting

[SSH] Need to connect to remote server as different user and without password

I have a task requiring that USER_A run a script, which connects to HOST_B as USER_B and does not ask for a password. If I am logged in on HOST_A as USER_B, I can connect to HOST_B without a password, no problem. However, if I try running ssh with the command line "ssh USER_B@HOST_B" while... (3 Replies)
Discussion started by: Totengraber
3 Replies

8. Shell Programming and Scripting

shell script for how to connect to a remote server by using ssh

i want to connect to a remote server through ssh. i have to also provide password within that script. after connecting to the remote server i want to do some operations like grep,cd etc can u pls help me to wite a script. Thanks (1 Reply)
Discussion started by: millan
1 Replies

9. Shell Programming and Scripting

how to connect to server with ssh to check process size

Hello i have to connect to 11 servers to check the process size on every server. how to that with shell scripting using ssh regards (7 Replies)
Discussion started by: mogabr
7 Replies

10. Shell Programming and Scripting

Not able to remotely connect to server using ssh

Hi, I am trying to run the below command in perl but when the perl script is executed it prompts a error message saying " ssh: <username>: Name or service not known ". Not able to understand this as this command runs perfectly on the server prompt. ` ssh <username>@pus4026dev df -k >>... (2 Replies)
Discussion started by: be2sp1
2 Replies
Login or Register to Ask a Question
RSOCKD(8)						      System Manager's Manual							 RSOCKD(8)

NAME
rsockd - SOCKSified SOCKS server SYNOPSIS
rsockd [ -ver | -i | -I ] DESCRIPTION
rsockd is the SOCKSified version of the SOCKS server sockd. Functionally rsockd is identical to sockd except that it may (though not nec- essarily has to) make use of other SOCKS servers to reach some destinations. A number of rsockd's can be strung together or organized in a cascade or other more complicated structures to serve the needs of a particular network configuration and restrictions. Obviously this complicates the issues and make the setup and maintenance of the firewall more difficult. So use sockd instead whenever you can. This document only describes the features of rsockd that are different from sockd. You should read sockd(5) carefully to gain a basic understanding of of how the SOCKS server works. When rsockd receives a request, it checks the request again its configuration (in exactly the same way that sockd does) to decider whether the request is to be accepted. The primary difference between sockd and rsockd is in how they establish connection to the destination host of a accepted request. sockd assumes that it can connect directly to the destination host and proceeds to do so. rsockd makes no such assumption. Instead, it consults another configuration file to decide whether it can connect directly to the particular destination host or whether it has to use a proxy connection through another SOCKS server. In other words, it behaves just like a versatile SOCKS client in this regard. Therefore rsockd requires not only the SOCKS server configuration file /etc/sockd.fc or /etc/sockd.conf to decide whether to accept or reject a request, but also the client configuration file /etc/socks.fc or /etc/socks.conf to decide how to reach the destination host. If it is a multi-homed version and supports RBIND, it also needs the route file /etc/sockd.fr or /etc/sockd.fr to decide which net- work interface to use for a connection. Look at it in a different way, you can think of sockd as a special case of rsockd, one which can connect directly to all destination hosts. In fact, an rsockd using the client configuration consisting of only this line direct ALL 0.0.0.0 is functinally identical to the regular sockd. Anther thing to mention is related to the use of identd. Only the SOCKS server which the requesting host directly connects to can find out the identity of the real user. Suppose user x on host C connects to rsockd on server B which in turn connects to sockd on server A in order to reach destination z. Host B can query identd on host C to find out whether the user is indeed x. To host A, the request appears to orig- inate from user x on host B. An identd query from Host A to host B returns the userid that owns the rsockd process on host B, not the real user x. OPTIONS
See sockd(8). EXAMPLES
The follwoing is an example of the client configuration file. See related man pages for examples on server configuration and route files. # /etc/socks.conf for rsockd of domain rnd.xyz.com # # Use proxy connection through SOCKS server on socks.market.xyz.com # to reach hosts within market.xyz.com sockd @=socks.market.xyz.com .market.xyz.com 0.0.0.0 # # Use direct connect to all other hosts within xyz.com direct .xyz.com 0.0.0.0 # # Use proxy connection through SOCKS server on gateway.xyz.com # to reach all others sockd @=gateway.xyz.com ALL 0.0.0.0 FILES
/etc/sockd.fc, /etc/sockd.conf, /etc/sockd.fr, /etc/sockd.route, /etc/socks.fc, /etc/socks.conf, /etc/inetd.conf, /etc/services, /var/adm/messages, /etc/syslog.conf SEE ALSO
sockd(8), socks_clients(1), sockd.conf(5), sockd.route(5), socks.conf(5), make_sockdfc(8), make_sockdfr(8), dump_sockdfc(8), dump_sockdfr(8) AUTHOR
Ying-Da Lee, ylee@syl.dl.nec.com May 6, 1996 RSOCKD(8)