10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
2. Red Hat
Hi ,
I have done the following things, but still i am not able to connect remote system without enter password.
steps:
1) ssh-keygen -t rsa
2) transfered id_rsa.pub file into remote server.
3) I hve redirect id_rsa.pub content to authorized_keys file.
Note: I have done the same in another... (6 Replies)
Discussion started by: maniapr08
6 Replies
3. Shell Programming and Scripting
I have written the following script to update some Debian boxes.
#!/bin/bash
mxg_hosts_file="/etc/mxg/ssh-hosts"
while read line ; do
mxg_host="$(echo ${line} | awk -F":" '{print $1}')"
mxg_port="$(echo ${line} | awk -F":" '{print $2}')"
echo "Connecting and Upgrading... (3 Replies)
Discussion started by: jelloir
3 Replies
4. Shell Programming and Scripting
Hi ,
I have this piece of code.
for xyz in `grep "$envir $envtype" ~/user/Move/config/ProdEnvList|cut -d "|" -f11`
do
username=`cat ~/user/Move/config/ProdEnvList|grep $xyz|cut -d "|" -f7`
hostname=`cat ~/user/Move/config/ProdEnvList|grep $xyz|cut -d "|" -f6`
ssh $username@$hostname -n 'cd... (2 Replies)
Discussion started by: debu182
2 Replies
5. Shell Programming and Scripting
Hi
Please help me with the following problem with my script.
The following block of code is not repeating in the while loop and exiting after searching for first message.
input_file
==========
host001-01
host001-02
2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies
6. Shell Programming and Scripting
Hi,
I have written a script file that first makes a ssh connection with the remote system and then does some job. My script file is as follows
#! /bin/sh
ssh 172.16.1.2 <<EOF
sa=`/usr/sbin/alternatives --config java </root/Desktop/1.txt 2>&1 | grep jdk1.6.0_05`
echo $sa
sa2=`echo $sa | sed -e... (1 Reply)
Discussion started by: Raghavan
1 Replies
7. UNIX for Advanced & Expert Users
hi all!
i'm trying to make ssh connection between COMP1 to any computer on my network and i get this error:
"Host key verification failed."
any computer can access COMP1 in ssh...
i have already deleted the "known_hosts" and "authorized_keys" files and created them again...
any1 have an... (1 Reply)
Discussion started by: eliraza6
1 Replies
8. Solaris
Hi,
I am trying to ssh to a server.
Senario is as below:
I have two servers A and B both are solaris and having ssh version
Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL
I have created proper keys on both using key-gen and copied public keys appropriatly.
I am able to ssh from A to B... (1 Reply)
Discussion started by: Muktesh
1 Replies
9. Shell Programming and Scripting
Hi Floks!
This is Sravan!
I am new to linux and I am trying to write bash shell script in which I want to change the user but the statements which are after the "su " command are not working that I mean I want to execute some statements as the changed user
here is the code
... (6 Replies)
Discussion started by: sravanp
6 Replies
10. UNIX for Advanced & Expert Users
Hi,
Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode:
warning: You have no controlling tty. Cannot read confirmation.^M
warning: Authentication failed.^M
Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies