Connection to diferent server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Connection to diferent server
# 1  
Old 01-08-2015
Linux Connection to diferent server

Hello I'm conecting in server1 and I need connect to server2(other). I need doing that becouse I need run a lot bach of diferent serverX. I explain better:

Connectionn server1 ## I need that all the step exit for xxx.txt of the server1
Code:
 - run xxxx.sh
   - Conection server2
        - su - user/pass
        - Run xxx.sh
        - Close that Server2
   - Conection server3
        - su - user/pass
        - Run xxx.sh
        - Close that Server3
   - Conection serverX
        - su - user/pass
        - Run xxx.sh
        - Close that ServerX

Can you help me?, I'm begining in unix, thanks a lot!!!! =)
Moderator's Comments:
Mod Comment Please use code tags to preserve spacing in sample input, output, and code segments.

Last edited by Don Cragun; 01-08-2015 at 11:24 PM.. Reason: Add CODE tags.
# 2  
Old 01-09-2015
Use a for or while loop to ssh into all the servers. Compile them in an list (text file). Use public key authentication to simplify login.
Do you really need to su to user/pass, can't you login to that user?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Connection establish two server

How do make connection between two linux server.Such as SSH,rsync,ftp (3 Replies)
Discussion started by: Mani T
3 Replies

2. UNIX for Dummies Questions & Answers

sftp connection to the same server(from same server)

Hi, After logging in to a server, Can I open a new sftp connection to the same server from the same server itself. Does it have any connection issues/limitations for ports etc. and can I copy/move files using the new sftp connection in the same server. Do we have any limitations of opening new... (1 Reply)
Discussion started by: Mathews567
1 Replies

3. Shell Programming and Scripting

multiple and diferent printf(s) for diferent fields in awk

Hi, I'm trying to print and outrput of a timestamp from a script i did that calcs de time diference betwen 2 timestamps in the format HH:MM:SS and i properly formated it with printf inside awk, but i can't do it with separate statements. This works fine, but can you explaim-me how to do it... (2 Replies)
Discussion started by: grafman
2 Replies

4. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

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

5. UNIX for Dummies Questions & Answers

Server fails to allow connection

Hi, I use bru to backup a variety of servers. One of our servers crashed and we had to do an emergency restore. It is working fine. The problem is the backup server refuses to backup the ftp server. The backup server ssh's into the servers and executed the bru command and instructs that that... (1 Reply)
Discussion started by: mojoman
1 Replies

6. UNIX for Dummies Questions & Answers

How can I check UDP connection to other server?

Hi, My network dep. telles me that they have opened the FW but my application still can not get through to other server. If it was TCP I could simply test it myself with "telnet", but how can I check it when the connection is UDP? Tnx (1 Reply)
Discussion started by: mehrdad68
1 Replies

7. Solaris

sun server connection

Hi, i'm really sorry to disturb you all, but i do need assistance. i am supposed to get a sun server up and running, and i dont have the slightest idea what to do. This is my first time with a sun server. On the rack, there is an e4500, d1000, 2 a5200's . there is also a netra t 1400, but its... (3 Replies)
Discussion started by: kehindedare
3 Replies

8. Linux

Makefile with sources in diferent folders

Hi guys! I have a problem to create a makefile when using 2 types of sources. Suppose we have sources at master_source folder: - 1.c - 2.c and also we have sources at platform_source folder: - 1.c I really need to use platform_source folder because there is many of them (one folder with... (8 Replies)
Discussion started by: borzh62
8 Replies

9. UNIX for Dummies Questions & Answers

Subtract date & time in diferent rows

Hi Friends :) I have a long file having fields in the form : Field1 yy/mm/dd hh:mm:ss Duration(Sec) line 1) 123123 05/11/30 12:12:56 145 line 2) 145235 05/11/30 12:15:15 30 line 3) 145264 05/11/30 13:14:56 178 . . I want to subtract yy/dd/dd hh:mm:ss in line (2) from yy/mm/dd hh:mm:ss in... (1 Reply)
Discussion started by: vanand420
1 Replies

10. UNIX for Dummies Questions & Answers

FTP connection problem on new server

Solaris Server (V880) version 8 Brand new box just installed O/S, what do I need to do in order to get FTP working. I have updated the /etc/hosts.equiv file Problem - When trying to ftp to the server I get a login incorrect message, this is with the root user. Are there some... (1 Reply)
Discussion started by: miredale
1 Replies
Login or Register to Ask a Question