is it possible for me to have a shell script log me in to a telnet session? i have in mind something along the lines of
% telnet host < script, where the first two lines of script will be username and pass followed by a list of commands to execute on the remote host.
this doesn t work as... (4 Replies)
Hello all,
I would like to login from one unix-system with a (tcsh)-script to an other unix-system.The login-procedure and the transmission of username, resp. password runs via ssh.
The problem is after logging onto the remote server once "Enter" has to be pressed, before one gets to the... (1 Reply)
Hi,
I am writing a script that will require me to perform tasks across servers. I tried to use rsh <host> "Commands..." > /dev/null 2>&1. However, I am required to execute a long series of commands after that and rsh does not seem to support this and its also insecure.
I tried to use rsh to... (5 Replies)
Hi,
I need to get the details (File System status & Memory status) of a remote server. I am executing a shell script in ksh and preparing the report.
Pls help.
Regards,
armohans. (1 Reply)
I honestly tried searching for this in this forum and in google. Maybe I found the answer but didn't even realized it.
I would like to run shell script thats on my machine that collects the hostname and IP address from the remote system and sends the output to my machine.
I'm not sure if need... (2 Replies)
Hi All,
I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands.
spawn ssh $uid@$host
expect "password:"
send "$password\r"
expect "*\r"
send... (2 Replies)
I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like
ssh hostname path ksh HC_Report.ksh>out.html
...but it generates the HTML file in
remote desktop .i... (2 Replies)
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
Hi ,
I have written a small script :
set -x
#!/bin/ksh
for i in `cat /tmp/list` ( list contains remove servers )
do
ssh -t $i << EOF
uname -a
cd ~user
echo "Enter the dir >"
read dir
path=`ll -ld /home/user/"$dir"`
if ; then
echo "Dir exists "
read
rm $path
else
echo "no such... (9 Replies)
local script:
cat > first.sh
cd /tmp
echo $PWD
echo `whoami`
cd /tmp/123
tar -cvf 789.tar 456
sleep 10
except script:
cat > first
#!/usr/bin/expect
set ip 10.5.15.20
set user "xyz123"
set password "123456"
set script first.sh
spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies
LEARN ABOUT DEBIAN
plack::middleware::session
Plack::Middleware::Session(3pm) User Contributed Perl Documentation Plack::Middleware::Session(3pm)NAME
Plack::Middleware::Session - Middleware for session management
SYNOPSIS
use Plack::Builder;
my $app = sub {
my $env = shift;
my $session = $env->{'psgix.session'};
return [
200,
[ 'Content-Type' => 'text/plain' ],
[ "Hello, you've been here for ", $session->{counter}++, "th time!" ],
];
};
builder {
enable 'Session';
$app;
};
# Or, use the File store backend (great if you use multiprocess server)
# For more options, see perldoc Plack::Session::Store::File
builder {
enable 'Session', store => 'File';
$app;
};
DESCRIPTION
This is a Plack Middleware component for session management. By default it will use cookies to keep session state and store data in memory.
This distribution also comes with other state and store solutions. See perldoc for these backends how to use them.
It should be noted that we store the current session as a hash reference in the "psgix.session" key inside the $env where you can access it
as needed.
NOTE: As of version 0.04 the session is stored in "psgix.session" instead of "plack.session".
State
Plack::Session::State
This will maintain session state by passing the session through the request params. It does not do this automatically though, you are
responsible for passing the session param.
Plack::Session::State::Cookie
This will maintain session state using browser cookies.
Store
Plack::Session::Store
This is your basic in-memory session data store. It is volatile storage and not recommended for multiprocessing environments. However
it is very useful for development and testing.
Plack::Session::Store::File
This will persist session data in a file. By default it uses Storable but it can be configured to have a custom serializer and
deserializer.
Plack::Session::Store::Cache
This will persist session data using the Cache interface.
Plack::Session::Store::Null
Sometimes you don't care about storing session data, in that case you can use this noop module.
OPTIONS
The following are options that can be passed to this module.
state
This is expected to be an instance of Plack::Session::State or an object that implements the same interface. If no option is provided
the default Plack::Session::State::Cookie will be used.
store
This is expected to be an instance of Plack::Session::Store or an object that implements the same interface. If no option is provided
the default Plack::Session::Store will be used.
It should be noted that this default is an in-memory volatile store is only suitable for development (or single process servers). For a
more robust solution see Plack::Session::Store::File or Plack::Session::Store::Cache.
BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to
cpan-RT.
AUTHOR
Tatsuhiko Miyagawa
Stevan Little <stevan.little@iinteractive.com>
COPYRIGHT AND LICENSE
Copyright 2009, 2010 Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.4 2011-03-29 Plack::Middleware::Session(3pm)