12-13-2008
You should use the ssh command where you specify the account you want to use to login to the remote system. For example ssh root@172.16.10.12. Then you should have the keys setup to allow you to run the command with no passwords and such.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Net::SSH::Perl ...... how to print the output in a proper format
my $cmd = "ls -l";
my $ssh = Net::SSH::Perl->new($host);
$ssh->login($user, $pass);
my($stdout, $stderr, $exit) = $ssh->cmd("$cmd");
print $stdout;
the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies
2. 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
3. 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
4. Shell Programming and Scripting
Help please!!
I want to use ssh to execute a remote exe and while it's running I want to query for the process ID of the exe (2 different ssh commands)
1. sshpass -p "<passwd>" ssh -f -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@<ipaddress> nohup /tmp/mmds_asyn &
2.... (0 Replies)
Discussion started by: rvompoluTMW
0 Replies
5. Web Development
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies
6. 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
7. Shell Programming and Scripting
Hi I have a perl command that doesn't seem to be working correctly. It appears to be fine but even when i try and run it manually same thing. Can someone take a look at this and tell me what they think the problem could be?
Here is the perl Line:
system ("echo 'ssh -t -t $user\@$_ \"cd... (3 Replies)
Discussion started by: vpundit
3 Replies
8. Shell Programming and Scripting
Hi,
The below command is not giving me the count , Can somebody help me in re-writing this pls .
Proc_Exist=`ssh -q -o "BatchMode=yes" -o "PasswordAuthentication=no" $OAUSER@${Primary_Node} ps -ef |
grep -v grep | grep "${ICM_Proc}" |wc -l `
Also the same problem with below... (13 Replies)
Discussion started by: Y.balakrishna
13 Replies
9. Shell Programming and Scripting
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
10. 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
LEARN ABOUT DEBIAN
cgi::ssi_parser
SSI_Parser(3) User Contributed Perl Documentation SSI_Parser(3)
NAME
CGI::SSI_Parser - Implement SSI for Perl CGI
SYNOPSIS
use CGI::SSI_Parser;
$CGI::SSI_Parser::recursive = 1;
fssi($filename);
sssi($string);
DESCRIPTION
CGI::SSI_Parser is used in CGI scripts for parsing SSI directives in files or string variables, and fully implements the functionality of
apache's mod_include module.
It is an alternative to famous Apache::SSI modules, but it doesn't require mod_perl. This is an advantage to those who are using public
hosting services. There is a disadvantage, however - the module consumes much memory, and I don't recommend using it on heavy-loaded sites
(currently it's being used on a site with 10000 hits, and I consider this as a limit). I hope to get rid of this disadvantage by the time
the release comes out (currently it's beta).
SSI Directives
This module supports the same directives as mod_include. For methods listed below but not documented, please see mod_include's online docu-
mentation at http://httpd.apache.org/docs/mod/mod_include.html .
o config
o echo
This directive is not fully supported in current version.
o exec
o fsize
o flastmod
o include
o printenv
o set
This directive is not supported in current version.
o perl
This directive is not supported in current version.
o if
o elif
o else
o endif
These four directives are not supported in current version.
Outline Usage
First you need to load the CGI::SSI_Parser module:
use CGI::SSI_Parser;
You need to specify the following when processing of all nested directives is needed (default value - 0):
$CGI::SSI_Parser::recursive = 1;
To parse file or string you need to use:
fssi($filename);
sssi($string);
The result is printed to STDOUT.
TO DO
Full implementation of all SSI directives.
Optimize memory consumption.
AUTHOR
Vadim Y. Ponomarenko, vp@istc.kiev.ua
SEE ALSO
mod_include, perl(1).
perl v5.8.0 2001-01-06 SSI_Parser(3)