BUG?: Assigning a Perl script as user shell + sending commands on ssh

This is a discussion on BUG?: Assigning a Perl script as user shell + sending commands on ssh within the OpenSSH Development forums, part of the Networking and Network Related category; Hi, This is sort of a strange issue. But I am experimenting with ways to have a user log in ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-27-2007
Brandon Simmons
 
Posts: n/a
Default BUG?: Assigning a Perl script as user shell + sending commands on ssh

Hi,
This is sort of a strange issue. But I am experimenting with ways to
have a user log in and be presented with a perl script to interact
with. When I do either or both of the following:

1) set the user's shell to /usr/bin/myperlscript

2) specify ForceCommand /usr/bin/myperlscript, applied to my user

....I get strange behavior when a command is appended to the client
connect command in this way:

ssh -l user 192.168.1.2 ls /etc

The output from the perl script is not printed immediately but waits
for a carriage return from the user before it is printed to the
screen> Here is an example using a test perl script:

me@computer:~$ ssh -l user 192.168.1.2 /bin/bash
user@192.168.1.2's password:
echo "I'm typing this line while the script seems not to be running"
here we go!

enter something:

YOU SAID: echo "I'm typing this line while the script seems not
to be running"

You can see that what I type is taken as <STDIN> by the script, so I
guess the output is stuck in a buffer somewhere. not sure if this is a
bug in OpenSSH or a perl oddity. Or maybe I really shouldn't be
setting my user's shell to be a script.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:05 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0