Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet 1

Status
Not open for further replies.

AIXtexas

Technical User
Feb 5, 2002
80
0
0
US
Is is possible to turn off telnet (port 23) for a particular user? Thus, forcing them to use SSH (port 22) to connect.

Thanks,
Shane
 
I don't know how to answer, but you can close any access via telnet by modifying the /etc/inetd.conf
 
If you put some code like the following in /etc/profile

Code:
case ${LOGNAME} in
 jeb|george|condy)
  if ps xww ${PPID}|grep -q telnetd
  then
   echo "Sorry ${LOGNAME}, you can't use telnet - please use ssh instead..."
   sleep 5
   exit
  fi
  ;;
esac

But be advised, Your local changes to /etc/profile are bound to get written over when you next upgrade the OS...

Also you want to make absolutely sure the code is functioning properly, or risk not getting back into the server yourself without too much of a hassle - try it out on a test box first...

HTH,

p5wizard
 
hello,

unless I'm wrong somewhere, in the caracteristics of an user, you can select if he may login remotely (this does not affect only telnet but rsh and rlogin too),

(smitty users => change / sow caracteristics of a user)

regards
 
I was told by IBM that if I disable remote login, that would also disable access via SSH.

Shane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top