l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2004 Jan 12 16:43

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Providing access to SSH on Kiosk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Providing access to SSH on Kiosk?



--On Monday, January 12, 2004 14:42:48 -0800 Bill Kendrick <nbs@sonic.net> wrote:

user='foo'
host='bar `xterm`'
xterm -e ssh $user@$host

Will pop up an xterm running ssh, and once you log in an xterm running
bash   :-)
That's a good one to be afraid of.  I'm sure there's some shell magic I
can do to get around this issue.  Probably some regexp some Unix guru
came up with back in the 70s? ;^)
Your best bet might be to avoid sh altogether and use perl, c, or something like that:

#!/usr/bin/perl -w
print "Host: ";
my $host = <STDIN>; chomp $host;
print "Username: ";
my $user = <STDIN>; chomp $user;
exec('/usr/bin/ssh', '-l', $user, $host);
exit 1;

Store this in a file, mark it executable, and run it as "xterm -e /path/to/script". The user can type any old garbage they like for the username or hostname. Ssh will just see it as a funny-looking username or hostname.

--
"Grand Funk Railroad paved the way for Jefferson Airplane, which cleared
the way for Jefferson Starship. The stage was now set for the Alan Parsons
Project, which I believe was some sort of hovercraft." - Homer Simpson

Kenneth Herron Kherron@newsguy.com 916-366-7338
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!