How to allow a remote user to connect over ssh on ubuntu 18.04Git and SFTP - How to separate them?I need a chroot user to now have ssh public key accessHow do I assign a specific user read/execute permissions to a susbset of folders in shell & SFTP?Allow user to connect to mysql via ssh to create database dump, but don't allow anything elseUser access restrictionsAllow a user to change his password on a chrooted environmentHow to create a user with a restricted shell
Check if simple regex matches string
Intuition behind image derivative using Fourier Transform for edges detection
Berlin 1923 & 1925 Address Book Abbreviations "I", "E", "Kgst" and "Mb"
Early computers without screens or sensors
make invisible depending on point of view
Is the net charge on a capacitor zero? If yes, then why?
What is the narrative difference between a Charisma and Wisdom saving throw?
How to I represent 5 eighth-notes as one note?
Simple solution for escaping from hanging Ubuntu OS (like pressing Ctrl+Alt+Del in Windows)?
Are there any spell casters that can cast life giving spells without 'expensive' components?
How to pair a xrightarrow with text on the top) to a sort of xleftarrow (with text on the bottom)?
Who started calling the matrix multiplication "multiplication"?
Putting creatures into play in alternative ways to summoning them
Why do aircraft cockpit displays use uppercase fonts?
Is it possible to kill parasitic worms by intoxicating oneself?
Is Kirk’s comment about “LDS” intended to be a religious joke?
Does the geothermal activity influence the climate in Iceland?
How to prevent discontent among the players when one player murders the others' characters?
Why are the Democrats & Republicans so homogeneous in their opinions of impeaching Trump?
What does "x employee is no longer employed by XYZ company" mean?
Why do LED Headlamp bulbs need active cooling?
Is a datagram from an upper network layer converted 1:1 to one of the lower layer?
How can I force a bank to close my account with them?
What's the current status of the Vehicle Routing Problem in the logistics industry?
How to allow a remote user to connect over ssh on ubuntu 18.04
Git and SFTP - How to separate them?I need a chroot user to now have ssh public key accessHow do I assign a specific user read/execute permissions to a susbset of folders in shell & SFTP?Allow user to connect to mysql via ssh to create database dump, but don't allow anything elseUser access restrictionsAllow a user to change his password on a chrooted environmentHow to create a user with a restricted shell
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
Before you yell me out, I already checked the answers on the web but couldn't install the system that I want correctly. Here is what I want:
- Allow a remote user to connect (to my pc) over
ssh
and able to use all the installed components likepython, g++, opencv
, etc. - Restrict the user in his own assigned subfolder like
/home/remoteuser
- I want the user to able to see correct prompt after login, like:
user@host:$
(not-bash-4.4$
) - I want the user to use all the bash commands since the solutions I have found so far don't allow the user to use even
ls
.
And I believe all the Linux users need all in one answer.
Last: I have Ubuntu 18.04.3 LTS
EDIT:
I have tried the way explained here: https://sxi.io/debian-ubuntu-linux-restrict-an-ssh-user-session-to-a-specific-directory-by-setting-chrooted-jail.html
Also, I have changed some options in
sshd_config
, like:
#ClientAliveInterval 0
to ClientAliveInterval 300
#PermitRootLogin prohibit-password
to PermitRootLogin yes
#PubkeyAuthentication blabla
to PubkeyAuthentication yes
#Subsystem sftp /usr/lib/openssh/sftp-server
to Subsystem sftp internal-sftp
Added this block also:
##Apply the chrooted jail to the user called tom and jerry
Match User myremoteuser
ChrootDirectory /home/myremoteuser
## Allow sftp to chrooted jail ##
#ForceCommand internal-sftp
AllowUsers myremoteuser
18.04 ssh user-management sshd adduser
|
show 1 more comment
Before you yell me out, I already checked the answers on the web but couldn't install the system that I want correctly. Here is what I want:
- Allow a remote user to connect (to my pc) over
ssh
and able to use all the installed components likepython, g++, opencv
, etc. - Restrict the user in his own assigned subfolder like
/home/remoteuser
- I want the user to able to see correct prompt after login, like:
user@host:$
(not-bash-4.4$
) - I want the user to use all the bash commands since the solutions I have found so far don't allow the user to use even
ls
.
And I believe all the Linux users need all in one answer.
Last: I have Ubuntu 18.04.3 LTS
EDIT:
I have tried the way explained here: https://sxi.io/debian-ubuntu-linux-restrict-an-ssh-user-session-to-a-specific-directory-by-setting-chrooted-jail.html
Also, I have changed some options in
sshd_config
, like:
#ClientAliveInterval 0
to ClientAliveInterval 300
#PermitRootLogin prohibit-password
to PermitRootLogin yes
#PubkeyAuthentication blabla
to PubkeyAuthentication yes
#Subsystem sftp /usr/lib/openssh/sftp-server
to Subsystem sftp internal-sftp
Added this block also:
##Apply the chrooted jail to the user called tom and jerry
Match User myremoteuser
ChrootDirectory /home/myremoteuser
## Allow sftp to chrooted jail ##
#ForceCommand internal-sftp
AllowUsers myremoteuser
18.04 ssh user-management sshd adduser
Enablesshd
& create a user with the restricted access you want. They need read access outside their own directory, otherwise they won't be able to run any commands (the need to see into the directory where commands are located, and then execute things there for commands to work). $PS1 is fully configurable. User to create is "remoteuser" in your example.
– guiverc
Oct 1 at 8:58
Please describe what you have tried and the outcome. For restricting the user, look at restricted shell, likerbash
.
– Soren A
Oct 1 at 9:02
@SorenA actually I tried here: sxi.io/…
– WhoCares
Oct 1 at 9:03
@guiverc I tried here: sxi.io/… but I am open to any other easy way or a link that describes it.
– WhoCares
Oct 1 at 9:04
@WhoCares .. for chroot jails, you need to have all commands copied into the chroot environment, as is described in the page you refers to, little over halfway down withls
as an example. If you need all commands, the rbash I mentioned earlier might be an easier solution.
– Soren A
Oct 1 at 9:16
|
show 1 more comment
Before you yell me out, I already checked the answers on the web but couldn't install the system that I want correctly. Here is what I want:
- Allow a remote user to connect (to my pc) over
ssh
and able to use all the installed components likepython, g++, opencv
, etc. - Restrict the user in his own assigned subfolder like
/home/remoteuser
- I want the user to able to see correct prompt after login, like:
user@host:$
(not-bash-4.4$
) - I want the user to use all the bash commands since the solutions I have found so far don't allow the user to use even
ls
.
And I believe all the Linux users need all in one answer.
Last: I have Ubuntu 18.04.3 LTS
EDIT:
I have tried the way explained here: https://sxi.io/debian-ubuntu-linux-restrict-an-ssh-user-session-to-a-specific-directory-by-setting-chrooted-jail.html
Also, I have changed some options in
sshd_config
, like:
#ClientAliveInterval 0
to ClientAliveInterval 300
#PermitRootLogin prohibit-password
to PermitRootLogin yes
#PubkeyAuthentication blabla
to PubkeyAuthentication yes
#Subsystem sftp /usr/lib/openssh/sftp-server
to Subsystem sftp internal-sftp
Added this block also:
##Apply the chrooted jail to the user called tom and jerry
Match User myremoteuser
ChrootDirectory /home/myremoteuser
## Allow sftp to chrooted jail ##
#ForceCommand internal-sftp
AllowUsers myremoteuser
18.04 ssh user-management sshd adduser
Before you yell me out, I already checked the answers on the web but couldn't install the system that I want correctly. Here is what I want:
- Allow a remote user to connect (to my pc) over
ssh
and able to use all the installed components likepython, g++, opencv
, etc. - Restrict the user in his own assigned subfolder like
/home/remoteuser
- I want the user to able to see correct prompt after login, like:
user@host:$
(not-bash-4.4$
) - I want the user to use all the bash commands since the solutions I have found so far don't allow the user to use even
ls
.
And I believe all the Linux users need all in one answer.
Last: I have Ubuntu 18.04.3 LTS
EDIT:
I have tried the way explained here: https://sxi.io/debian-ubuntu-linux-restrict-an-ssh-user-session-to-a-specific-directory-by-setting-chrooted-jail.html
Also, I have changed some options in
sshd_config
, like:
#ClientAliveInterval 0
to ClientAliveInterval 300
#PermitRootLogin prohibit-password
to PermitRootLogin yes
#PubkeyAuthentication blabla
to PubkeyAuthentication yes
#Subsystem sftp /usr/lib/openssh/sftp-server
to Subsystem sftp internal-sftp
Added this block also:
##Apply the chrooted jail to the user called tom and jerry
Match User myremoteuser
ChrootDirectory /home/myremoteuser
## Allow sftp to chrooted jail ##
#ForceCommand internal-sftp
AllowUsers myremoteuser
18.04 ssh user-management sshd adduser
18.04 ssh user-management sshd adduser
edited Oct 1 at 9:14
WhoCares
asked Oct 1 at 8:52
WhoCaresWhoCares
473 bronze badges
473 bronze badges
Enablesshd
& create a user with the restricted access you want. They need read access outside their own directory, otherwise they won't be able to run any commands (the need to see into the directory where commands are located, and then execute things there for commands to work). $PS1 is fully configurable. User to create is "remoteuser" in your example.
– guiverc
Oct 1 at 8:58
Please describe what you have tried and the outcome. For restricting the user, look at restricted shell, likerbash
.
– Soren A
Oct 1 at 9:02
@SorenA actually I tried here: sxi.io/…
– WhoCares
Oct 1 at 9:03
@guiverc I tried here: sxi.io/… but I am open to any other easy way or a link that describes it.
– WhoCares
Oct 1 at 9:04
@WhoCares .. for chroot jails, you need to have all commands copied into the chroot environment, as is described in the page you refers to, little over halfway down withls
as an example. If you need all commands, the rbash I mentioned earlier might be an easier solution.
– Soren A
Oct 1 at 9:16
|
show 1 more comment
Enablesshd
& create a user with the restricted access you want. They need read access outside their own directory, otherwise they won't be able to run any commands (the need to see into the directory where commands are located, and then execute things there for commands to work). $PS1 is fully configurable. User to create is "remoteuser" in your example.
– guiverc
Oct 1 at 8:58
Please describe what you have tried and the outcome. For restricting the user, look at restricted shell, likerbash
.
– Soren A
Oct 1 at 9:02
@SorenA actually I tried here: sxi.io/…
– WhoCares
Oct 1 at 9:03
@guiverc I tried here: sxi.io/… but I am open to any other easy way or a link that describes it.
– WhoCares
Oct 1 at 9:04
@WhoCares .. for chroot jails, you need to have all commands copied into the chroot environment, as is described in the page you refers to, little over halfway down withls
as an example. If you need all commands, the rbash I mentioned earlier might be an easier solution.
– Soren A
Oct 1 at 9:16
Enable
sshd
& create a user with the restricted access you want. They need read access outside their own directory, otherwise they won't be able to run any commands (the need to see into the directory where commands are located, and then execute things there for commands to work). $PS1 is fully configurable. User to create is "remoteuser" in your example.– guiverc
Oct 1 at 8:58
Enable
sshd
& create a user with the restricted access you want. They need read access outside their own directory, otherwise they won't be able to run any commands (the need to see into the directory where commands are located, and then execute things there for commands to work). $PS1 is fully configurable. User to create is "remoteuser" in your example.– guiverc
Oct 1 at 8:58
Please describe what you have tried and the outcome. For restricting the user, look at restricted shell, like
rbash
.– Soren A
Oct 1 at 9:02
Please describe what you have tried and the outcome. For restricting the user, look at restricted shell, like
rbash
.– Soren A
Oct 1 at 9:02
@SorenA actually I tried here: sxi.io/…
– WhoCares
Oct 1 at 9:03
@SorenA actually I tried here: sxi.io/…
– WhoCares
Oct 1 at 9:03
@guiverc I tried here: sxi.io/… but I am open to any other easy way or a link that describes it.
– WhoCares
Oct 1 at 9:04
@guiverc I tried here: sxi.io/… but I am open to any other easy way or a link that describes it.
– WhoCares
Oct 1 at 9:04
@WhoCares .. for chroot jails, you need to have all commands copied into the chroot environment, as is described in the page you refers to, little over halfway down with
ls
as an example. If you need all commands, the rbash I mentioned earlier might be an easier solution.– Soren A
Oct 1 at 9:16
@WhoCares .. for chroot jails, you need to have all commands copied into the chroot environment, as is described in the page you refers to, little over halfway down with
ls
as an example. If you need all commands, the rbash I mentioned earlier might be an easier solution.– Soren A
Oct 1 at 9:16
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177854%2fhow-to-allow-a-remote-user-to-connect-over-ssh-on-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177854%2fhow-to-allow-a-remote-user-to-connect-over-ssh-on-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Enable
sshd
& create a user with the restricted access you want. They need read access outside their own directory, otherwise they won't be able to run any commands (the need to see into the directory where commands are located, and then execute things there for commands to work). $PS1 is fully configurable. User to create is "remoteuser" in your example.– guiverc
Oct 1 at 8:58
Please describe what you have tried and the outcome. For restricting the user, look at restricted shell, like
rbash
.– Soren A
Oct 1 at 9:02
@SorenA actually I tried here: sxi.io/…
– WhoCares
Oct 1 at 9:03
@guiverc I tried here: sxi.io/… but I am open to any other easy way or a link that describes it.
– WhoCares
Oct 1 at 9:04
@WhoCares .. for chroot jails, you need to have all commands copied into the chroot environment, as is described in the page you refers to, little over halfway down with
ls
as an example. If you need all commands, the rbash I mentioned earlier might be an easier solution.– Soren A
Oct 1 at 9:16