10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Im running the below command
sshpass -p mypassword ssh -t user1@server2 /bin/bash -c 'echo "mypassword" | sudo -S -l; echo "$?#`grep -iE "user66|dbuser|tomcat|splunk|stash|jira|user2|docadmin" /etc/passwd`"; exit'
Below is the error I get: Output:
I run this command across a... (1 Reply)
Discussion started by: mohtashims
2. Shell Programming and Scripting
I'm trying to run a script remotely on a server in a particular directory named after hostname which already exists, my login session gets killed as soon as I run the below command. Not sure what is wrong, is there a better way to do it ?
Note: I can also use nohup command to run... (14 Replies)
Discussion started by: mbak
3. Shell Programming and Scripting
Wishing to all.
I am very new joined in an organization as a unix system administrator.
I need a help in preparing a script for a report.
i have a file contains all of the linux/ubuntu servers line by line around 140 servers.
:wq (3 Replies)
Discussion started by: kumaraswamy
4. Shell Programming and Scripting
I need a shell script using expect to login to couple of remote servers and read "crontab -l -u <username>" & "cat /etc/rc.local" & "df -h" and able to create output into a file saved locally with hostname.crontab & hostname.rc.local & disk.status. I can supply a file as list of hostname or IP... (4 Replies)
Discussion started by: jaipsharma
So I have a scriptlet called solaris_command:
for i in \
server1 server2 server3
ssh $i $1
I then use that as a command in multiple scripts to allow for data gathering for all virtual hosts in the environment thusly:
solaris_command "cat... (3 Replies)
Discussion started by: os2mac
6. Shell Programming and Scripting
I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
7. Shell Programming and Scripting
I am running a shell script from a central server to multiple remote servers using the following code:
# Linux/UNIX box with ssh key based login
# SSH User name
# create new file
# connect... (2 Replies)
Discussion started by: mystition
8. UNIX for Dummies Questions & Answers
Im trying to remote into a server, run a script that resides on that server and capture the information displayed & store in a local file.
I struggled with this yesterday & finally that script is working now.
Now, here is a scope creep and the script that I wrote for 1 remote... (2 Replies)
Discussion started by: OMLEELA
9. Shell Programming and Scripting
I am bit new to shell scripting. I need some help in my script.
I have to login into 15 servers and check some logs daily. For that I've written one shell script, somewhere it is having some problems. After log into the first server, the script is not going with the next steps.... (6 Replies)
Discussion started by: raghu.iv85
10. Shell Programming and Scripting
I need to login into multiple servers thru a script run couple commands and run find command as root. I only have ssh access to the servers as a user than I can "su" to root. If you have a similar script please post it. Also if you can suggest commands that I should consider please let me know.
... (1 Reply)
Discussion started by: avcert1998