SSH to default dir

Discussion in 'Installation/Configuration' started by Stelios, Oct 22, 2020.

Tags:
  1. Stelios

    Stelios Active Member HowtoForge Supporter

    Hi all,

    When I setup a new user to have SSH access by default it goes to:
    /var/www/clients/client1/web4/home/stelios1

    I want to go by default to the public directory, that is:
    /var/www/clients/client1/web4/web

    It seems that this is not possible via the GUI; it throws:
    The directory has to be inside the web root.

    Is there a way to update a template file or whatever to have any ssh user to use its public directory by default?

    Thanks in advance
     
  2. Steini86

    Steini86 Active Member

    In general, the default directory is the "home" directory of the (ssh) user. It will break things, if you change this. However, you might be able to create a "~/.bash_profile" file which is executed at login. There insert a "cd /" at the end. This should change the directory to the web root.
     

Share This Page