Hi I have a login shell via /bin/rbash However i cannot scp to the home directory. Is there anyway to solve this?

scp /tmp/x user@ip:/home/ubuntu/x

how to make above work when user always gets a restricted shell on login

  • 2
    Use SFTP, instead of SCP. Or if you like the commandline interface of scp, use up-to-date version of OpenSSH, in which scp uses SFTP. See stackoverflow.com/q/22764511/850848 Commented Jan 19 at 7:36
  • @MartinPrikryl, if users are configured with rbash as their shell, chances are the sftp subsystem is not enabled either as that would allow circumventing some of the restrictions. In any case, restricted shells are very weak security measures so there's probably a way to work around it, but that would likely go against the policies put in place by the administrators Commented Jan 19 at 9:51
  • If your shell is a restricted shell, you have an account where actions are restricted. You should check the terms of use for what is acceptable or contact the system administrators. Commented Jan 19 at 9:53
  • 2
    I’m voting to close this question because OP appears to be trying to bypass local security policy. If that is a constraint he/she should speak his local IT support.
    – symcbean
    Commented Jan 20 at 1:44

1 Answer 1


You may find it convenient to configure a separate account, within same group, for remote scp access. And then in the file system use chmod to allow group permission for the required access.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .