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. Shell Programming and Scripting
Hi,
i want to write script where it will login into 50 hosts and if login is successful it print message "login to host1 is
successful" if not it should print message "Not able to login to host1". once connection to the host is succesful it should fire df command to check filesystem if df is... (3 Replies)
Discussion started by: amru8810
3 Replies
3. Shell Programming and Scripting
I am automating the SFTP keys setp process:
So i created the expect script for controlling the output of shell
below is my main code:
#!/usr/bin/expect
set fd
set password
close $fd
set df
set app
close $df
spawn ssh servername << pb
Pb file:
set df
set app
close $df (4 Replies)
Discussion started by: Manoj Bajpai
4 Replies
4. Shell Programming and Scripting
Hello,
I am running into few issues, please suggest me what I am missing.
I am running this script on a linux host.
Main idea of this script is to, login to each host via ssh and get uid of user, service user that I trying to run this script, has already deployed ssh keys and provide sudo... (8 Replies)
Discussion started by: bobby320
8 Replies
5. Shell Programming and Scripting
Hi all,
I am facing the following issue:
Host A should execute a remote command (say pwd) on host B2.
B2 is not directly reacheable but you have to connect from a to B1, then from B1 you can execute the command ssh user@B2 pwd.
B1 and B2 are directly connected:
A => B1 => B2
| ... (3 Replies)
Discussion started by: Evan
3 Replies
6. UNIX for Advanced & Expert Users
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies
7. Solaris
server is ok, I can login on console. however, when I use SSH teachia, there is no repsond.
i have check ps-ef | grep ssh, it shows ok. restart ssh too. still not working.
Anything else I need to check?
# ps -ef | grep ssh
root 24706 1 0 Jun 12 ? 0:00... (7 Replies)
Discussion started by: uuontario
7 Replies
8. Shell Programming and Scripting
Hi, could anyone please tell me how to ssh to remote host foo and execute command on it and print the result on local host?
Thanks,
Paresh (1 Reply)
Discussion started by: masaniparesh
1 Replies
9. Shell Programming and Scripting
i want a script with expect or perl or shell which will do ssh to remote host...it will take commandline argument and run the script in remote host.......
i.e that will be like ./ssh.exp remoteip username passwd /tmp.kk.sh
can someone help me on this? (1 Reply)
Discussion started by: Aditya.Gurgaon
1 Replies
10. Shell Programming and Scripting
Hi,
I am having nightmare issue-ing remote ssh command from a CGI perl script.
It just won't run on debug message: It says permission denied. Can I even do this? as the apache server running under DAEMON account probably can't execute it? Is this the case of what's going on?
Here is my... (3 Replies)
Discussion started by: Dabheeruz
3 Replies