Login or Register to Ask a Question and Join Our Community


connecting to another unix box


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting connecting to another unix box
# 1  
Old 01-09-2006
connecting to another unix box

Hi gurus,
I am entirely new to unix. So if my questions are foolish, please bear with me.
I have two unix boxes A and B. Is it possible to execute a command or a shell script in box B standing in box A. I mean if i log in to box A and execute a shell script, it should be able to login to B and execute a command there and exit. Please let me know if you need some more details.

thanks
bade_miya
# 2  
Old 01-09-2006
try:
Code:
man remsh
man rlogin
man rexec

Choose the one that you want.
# 3  
Old 01-09-2006
Hi there.

I don't know if U are using the RSH of SSH (more secure) way of conntecting.
Any case. Try using this

[rsh/ssh] [other server] [command]

eg. rsh A date
or
ssh B /u/bin/hop.sh

It will run the command from the orher server and exit again. U can also copy stuff rcp / scp file1 A:/u/bin/ or something like it.

Hope it helps.
# 4  
Old 01-09-2006
Hi Jim,
Thanks for the help. I created a sample shell script using the data you provided. It looks something like this.

Code:
#!/bin/ksh
remsh boxname -l username 
cd mydir
./myscript

The problem is where do we specify the password. If i try to run this script, its prompting me for a password. But if i am to automate this process, i should figure out a way to automatically give the password while execution.

Thanks a ton,
bade_miya
# 5  
Old 01-09-2006
Sorry, i forgot to tell you guys that the user name in which i am logged in the first machine is different from the second machine.
Hi Blooper,
Thanks for the reply. i am using rsh.

thanks
bade_miya
# 6  
Old 01-09-2006
if you do a man on rlogin, rlogin uses a .rhosts file to have these entries stored., however this is not a secure way. use ssh instead.
# 7  
Old 01-10-2006
Hi linuxpenguin,
please tell me which directory i should put the .rhosts file with the entries.

thanks
bade_miya
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Transferring the file from one UNIX box to another UNIX box

Hi Folks, I am using winscp to graphiclly move the files from one unix box to another unix box , let say one unix box crediantials is (These are dummy crediantials) xxx -->username yyy -->password and another unix box name is RRR -->username TTT -->password NOW i need to... (4 Replies)
Discussion started by: punpun66
4 Replies

2. UNIX for Advanced & Expert Users

Help connecting linux box to Windows - winbindd problem

Hi experts - I hope you can help me. I am trying to resolve Windows host names (aka Netbios names, aka "UNC names) from a Linux box. I have added "dns wins" to the "hosts" line at /etc/nsswitch.conf, and installed samba 3.2.2 and ran "winbindd -D". Now, when I go: "wbinfo -N venus" (where... (1 Reply)
Discussion started by: maryg
1 Replies

3. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

4. Shell Programming and Scripting

how to compare all files in one unix box has been to copied to another unix box

Hi our unix admin has copied all files from one unix box to new unix box. We just need to confirm that all the file systems are copied properly. How to validate. (9 Replies)
Discussion started by: sravanreddym
9 Replies

5. UNIX for Dummies Questions & Answers

I need an scp command from a unix box to a windows box.

scp file="myfile.txt" todir="user@somehost:(M:drive:/somepath/)"/ Not sure I need it to go to a specific drive on the windows box (1 Reply)
Discussion started by: xgringo
1 Replies

6. Shell Programming and Scripting

Moving files from Unix box to a windows box

Hi All, I need a little help .I want to transfer a file from unix box to a windows box,but the problem i'm facing is that in windows box FTP is not enabled and currently it is nearly impssible to change setting on windows box,i can not use the ftp method ,in my shell script to transfer the file.... (2 Replies)
Discussion started by: Preet
2 Replies

7. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

8. Shell Programming and Scripting

Connecting To Different Unix Box

Hi gurus I want to to connect to a different unix box from current unix box and navigate to a folder and check if the log files are generated for every 10 minutes in the another unix box. how do i go about this requirement. is there a way to connect to different unix boxes. thanks raghavendra (5 Replies)
Discussion started by: ragha81
5 Replies

9. UNIX for Advanced & Expert Users

How to FTP a file generated at UNIX Box to NT Box

Hi all, I am generating a file on the Unix machine , now i want to FTP the same file to the NT machine. how can i do that and the application currently upon which i am working is a JAVA based application. I need your help. regards Ruchir (2 Replies)
Discussion started by: Ruchir
2 Replies

10. UNIX for Advanced & Expert Users

VPN client (windows Box),and Server (Unix Box)

If I want to access unix box via VPN tunnel,from windows box. What sould I configure on the windows client PC, and what should I enable on the Unix Server box ? I am using Solaris V10 intel platform, and I am using windows XP, and 2003 for client (0 Replies)
Discussion started by: zillah
0 Replies
Login or Register to Ask a Question

Featured Tech Videos