Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What is the context? If they are coming into the chroot via SSH then all you need is for them to use -J on the client to specify the intermediate machine.
What is the context? If they are coming into the chroot via SSH then all you need is for them to use -J on the client to specify the intermediate machine.
Please write a bit more about what you are trying to do and how root has accidentally become involved. With the -J method they really are logging in but just passing through.
Please write a bit more about what you are trying to do and how root has accidentally become involved. With the -J method they really are logging in but just passing through.
Root was a mistake:
output for a user:
Code:
No user exists for uid 1000
So you log into the jump host, then you log into a computer from then in a privileged network for example:
So you log into the jump host, then you log into a computer from then in a privileged network for example:
If the middle host is chrooted, then that is another reason to use the -J option. The main reason is that so you don't have to trust the middle machine at all, the connection is just streamed across it without decrypting.
Assuming that bastion.example.com chroots the accounts,
Then the password for inside.example.com is exposed on bastion as well as the data. Also, if the accounts on bastion are chrooted, then you'll have to have all the files and devices and logs present inside the chroot in order for the SSH client to work.
What aspect of your work flow makes you hesitant to use -J as normal?
If the middle host is chrooted, then that is another reason to use the -J option. The main reason is that so you don't have to trust the middle machine at all, the connection is just streamed across it without decrypting.
Assuming that bastion.example.com chroots the accounts,
Then the password for inside.example.com is exposed on bastion as well as the data. Also, if the accounts on bastion are chrooted, then you'll have to have all the files and devices and logs present inside the chroot in order for the SSH client to work.
What aspect of your work flow makes you hesitant to use -J as normal?
Okay yes I see your point, how would I implement this so that the user isnt actually allowed to log in to the bastion host and they can only use the "-J" switch on the command line?
With the -J option, called ProxyJump in the client configuration, they really are logging in on the bastion host. It is just that they are not given a shell there and before any commands are run the stream is forwarded on to the next host in the chain. So it works even if everyone is chrooted on the bastion, say for chrooted SFTP there or just to avoid letting them having a shell on the bastion host.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.