Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
January 12, 2008, 5:18 pm
rate this thread
#need to differentiate between 1st: login via serial
# 2nd: login via ssh and
# 3rd: scp to the box
#tried to solve with an own custom script in /etc/passwd
#but this solves only 1st and 2nd
#any idea ?
if [ "`tty`" == "/dev/ttyS1" ] ; then
#for usecase A
echo "do special stuff when login via serial .."
#for usecase B and C
exec /bin/sh --login
#also tried with /bin/bash , without --login and lot more
# code above is initial shell in /etc/passwd of box 192.168.1.88
#usecase A: do special stuff when login via serial ---> this works
#usecase B: login via ssh --> works too
#usecase C: scp from external box --> does NOT work
# scp foo email@example.com:/root/foo
#I think this is not a scp, but an problem of underlying ssh:
#this fails too:
# ssh -x firstname.lastname@example.org /bin/true
#what I see in pstree -p is this:
# | `-sshd(15281)---sh(15288)
#which means that sh is started via exec, but then there is something
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum