Passing password with SSH command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Passing password with SSH command
# 8  
Old 07-04-2013
Thanks Just Ice. Could you please explain me how to do it to generate the key pair for two servers inside ssh keys file?

It will be very helpful.
# 9  
Old 07-07-2013
you generate the ssh keys in the same way as you would single server keys ... just add the public keys into the same .authorized_keys file ... but before you get lost there ...

first off, we need to know ...

1. direction of replication (i.e., prod to dr, dr to prod, both ways, etc.)

2. files and directories being replicated (i.e., ALL, /export/home, /, etc.)

3. domain/network of prod and dr servers (i.e., prod servers are in prod.some.com and network 192.168.1.0 while dr servers are in dr.some.com and network 192.168.15.0)

4. naming convention of prod and dr servers (i.e., server1 in prod and server1-d in dr)
# 10  
Old 07-08-2013
Thank Ice Age.

Direction of replication :- One way (prod to dr).
files and directories being replicated completely (i.e., ALL, /export/home, /, etc.)
domain/network of prod and dr servers :- Production Host name and DR host name will be same but IP's will be different.
Naming convention of prod and dr servers is different. Server-1 and for DR Server-2

Reagrds,
Sourabh
# 11  
Old 07-08-2013
I'm assuming that there must be some parts not replicated, such as the network configuration. How do you exclude these files? We might need to exclude a few others for the replication.

If you replicate absolutely everything, then if you DR server boots, it will get the IP address of the production server. If it is not isolated it could damage production services by getting in the way of your real production server. I'm assuming that you have identical hardware, else you might have issues booting anyway with device addresses all being wrong.


Is there a neat, yet complete definition of what for the OS filesystems is replicated rather than just everything? Do not worry about application & data filesystems information.




Robin
# 12  
Old 07-08-2013
Yes Robin,

Netwrok configurations will be different. It implies IP address of each dr server will be differnt from the productions ones. So that in Host file, We will be having differnt IP addresses mentioned for DR servers.
# 13  
Old 07-08-2013
So that tells me that you are not replicating everything. What is excluded?



Robin

Last edited by rbatte1; 07-08-2013 at 01:30 PM..
# 14  
Old 07-09-2013
Only hostfile will be excluded. DR servers will be having differnt hostfile than production servers.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing password for ssh in Script

I want to do following 2 commands via script: 1) eval `ssh-agent`2) ssh-add /export/home/sufuser/.ssh/id_rsa When asked for passphrase enter "passwordpassword1234 but whenever I run the script it stucks after "ssh-add /export/home/sufuser/.ssh/id_rsa" command and asks fro... (4 Replies)
Discussion started by: yogeshpawar
4 Replies

2. Shell Programming and Scripting

Passing Password to SSH without using expect in a Script

How can I pass password in SSH command without using expect in a shell program. I don't have expect installed on my Solaris server. #!/bin/bash ssh user@hotname (how to supply pass in script?:wall:) Experts please help its very urgent. Shrawan Kumar Sahu (4 Replies)
Discussion started by: ss135r
4 Replies

3. Shell Programming and Scripting

Passing password in script for ssh connection - no except

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

4. Shell Programming and Scripting

passing password to a command

Hi all, I have the expect binaries in our boxes.. I want to pass a passwd to a command automatically without manual intervention using "/<path_of_expect>/expect/<version>/bin/autopasswd" The below command will ask passwd in my script cleartool rmtag -all <vob_tag> #Some... (4 Replies)
Discussion started by: raghu.iv85
4 Replies

5. Shell Programming and Scripting

Passing Password into scp Command

Hi Everyone, I'm trying to run scp as a one-line command, as of right now, it prompts me for the user's password to the remote machine. Does anyone know if there is an option to pass the password parameter into the scp command on the same line so it doesn't prompt me? Thanks! (1 Reply)
Discussion started by: twhitmarsh
1 Replies

6. Shell Programming and Scripting

SSH Login by passing password.

ssh/sftp login by passing password , is it possible.Don't want to expect. (1 Reply)
Discussion started by: dinjo_jo
1 Replies

7. Shell Programming and Scripting

ssh - passing password in shell script

I have a requirement, I need to run a command at remote system using a ssh. Is there any way we can pass the username and password in shell script to the ssh command as we did it in one of the shell script for FTP. ftp -n $i <<!EOF >> user Username $PASSWD cd /home/scripts ... (5 Replies)
Discussion started by: Muktesh
5 Replies

8. Shell Programming and Scripting

Passing SSH Command Parameters

Hi, I wan to pass arguments to remote script in Unix . For that I'm using ssh PFB the code I'm using: ssh -t -l osdac 10.81.33.51 "cd /appl/OSD/LOGS/flstr010/test.sh "$1" "$2"" Problem is I'm not able to pass second argument . Can anyone plz help me in resolving this. (5 Replies)
Discussion started by: suchitasaner27
5 Replies

9. AIX

Passing a command over SSH

I'm trying to run a command over ssh to AIX 5.2, something like: ssh machine ls but it just hangs. I can ssh into the machine and run a command, but can't pass it like above. Is there a security setting that disables this by default? If so, how do I change it? Thanks! (8 Replies)
Discussion started by: hansnueski
8 Replies

10. Solaris

Passing SSH Command Parameters

On Solaris 5.9, is there any way to pass parameter(s), via SSH, to a command defined in the remote host's authorized_keys file? We have a menu that uses SSH to control some apps on our various hosts. I've been tasked with enhancing it and making it more secure. So far, the local host menu... (2 Replies)
Discussion started by: PabloCruise77
2 Replies
Login or Register to Ask a Question