How to quickly create an SCP account with limitted permissions?

Discussion in 'Command Line' started by postcd, Apr 21, 2014.

  1. postcd

    postcd Member

    Messages:
    63
    Likes Received:
    5
    Trophy Points:
    8
    Hello,


    im having a linux (redhat) vps with root ssh access. i want to quickly create a new account for scp connections.

    example i want to temporarilly give the credentials to some person which i dont know good. And i want him to have only access to folder lets say /home/peter ? and dont allow him to to consume more than 20gb of disk space or anyhow breach the security of the linux system.

    is there any quick secure way to allow such scp access?
    DevynCJohnson likes this.
  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    1,260
    Likes Received:
    427
    Trophy Points:
    83
    You can just use the useradd command:
    Code:
    useradd -m -d /home/peter -p PASSWORD_HERE peter
    will create /home/peter, a group called peter, a user named peter, and a password of PASSWORD_HERE. By default this account should only be able to access it's home folder.
  3. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,331
    Likes Received:
    1,068
    Trophy Points:
    113

Share This Page