Execute ssh command with additional terminal command to any remote user not working script
Hello i am having an issue with bash script and this is the code
When i execute only part with cat, it returns me IP address.
But when I put a command, nothing happend, it not returning me to write something, just like it is freeze, i must put ctrl+c to get job quit.
Hi Group ,
I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages.
- i m writing
>write user-id
! ls
o
ctrl-d
inspite of executing the command ls,other terminal shows ! ls.
Thnx in advance. (2 Replies)
Hi All,
I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options.
Requirement:
Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
I don't know why the following shell script doesn't work. Could you please help me out?
#!/usr/bin/ksh
test="cal > /tmp/tmp.txt 2>&1"
$test
I know it will work for the following format:
#!/usr/bin/ksh
cal > /tmp/tmp.txt 2>&1
However, I need to get the command from the user in... (1 Reply)
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)
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
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)
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
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)
How should i make the following code working
#!/bin/bash
INPUTFILE="test.txt"
while read STRING; do
IP=`host -t A $STRING | awk '{print $NF}'`
HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"`
echo $HOSTNAME > out.txt
done < $INPUTFILE
At this moment while... (3 Replies)
Discussion started by: urello
3 Replies
LEARN ABOUT DEBIAN
cgexec
CGEXEC(1) libcgroup Manual CGEXEC(1)NAME
cgexec - run the task in given control groups
SYNOPSIS
cgexec [-h] [-g <controllers>:<path>] [--sticky] command [arguments]
DESCRIPTION
The cgexec program executes the task command with arguments arguments in the given control groups.
-g <controllers>:<path>
defines the control groups in which the task will be run. controllers is a list of controllers and path is the relative path to
control groups in the given controllers list.
This flag can be used multiple times to define multiple pairs of lists of controllers and relative paths. Instead of the list of
all mounted controllers, the wildcard b"*b" can be used.
If this option is not used, cgexec will automatically place the task in the right cgroup based on /etc/cgrules.conf.
-h, --help
Display this help and exit.
--sticky
If running the task command with this option, the daemon of service cgred (cgrulesengd process) does not change both the task of the
command and the child tasks. Without this option, the daemon does not change the task of the command but it changes the child tasks
to the right cgroup based on /etc/cgrules.conf automatically.
EXAMPLES
cgexec -g *:test1 ls
runs command ls in control group test1 in all mounted controllers.
cgexec -g cpu,memory:test1 ls -l
runs command ls -l in control group test1 in controllers cpu and memory.
cgexec -g cpu,memory:test1 -g swap:test2 ls -l
runs command ls -l in control group test1 in controllers cpu and memory and control group test2 in controller swap.
FILES
/etc/cgrules.conf
default libcgroup configuration file
SEE ALSO
cgrules.conf (5)
Linux 2009-03-15 CGEXEC(1)