Find the answer to your Linux question:
Results 1 to 2 of 2
Greetings, I'd like to set up an alternate shell startup script for ssh logins. In other words, I want to execute a different .bash_profile when I login via ssh, than ...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    1

    Thumbs down Change shell script when loggin in via ssh

    Greetings,

    I'd like to set up an alternate shell startup script for ssh logins.

    In other words, I want to execute a different .bash_profile when I login via ssh, than the one that is executed when I login locally.

    Any suggestions on how to do this?

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    welcome to the forum

    from "man ssh"

    : /etc/ssh/sshrc
    :
    : Commands in this file are executed by ssh when the
    : user logs in just before the user's shell (or
    : command) is started. See the sshd manual page for
    : more information.

    so if you put "rsh" in there, I guess the user has a
    restricted shell: YMMV
    the sun is new every day (heraclitus)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...