SSH to default dir

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

  1. Stelios

    Stelios Active Member HowtoForge Supporter

    Hi all,

    When I setup a new user to have SSH access by default it goes to:

    I want to go by default to the public directory, that is:

    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