<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">thats strange. you cannot incorporate a sudo -u apache into the mix? how does vs-code work with its ssh protocols?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 22, 2024 at 1:25 PM <<a href="mailto:techlists@phpcoderusa.com">techlists@phpcoderusa.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I appreciate all the feedback.  There is more to the story.<br>
<br>
I am running a 10 year old Dell that is my daily driver.  It has Kubuntu <br>
installed on it.<br>
<br>
I have a MSW10 laptop on my private network that I have installed <br>
VirtualBox on.<br>
<br>
I am a PHP developer so I use LAMP to further my goals of PHP dev.  <br>
Ultimately I want to have a LAMP config that allows me to use Visual <br>
Studio Code to edit remotely.  That requires the SSH user needs to be <br>
the owner of the Apache virtual host docroot directories and file.<br>
<br>
That way there is no ownership issues while uploading and downloading <br>
files or adding, modifying, or removing directories.<br>
<br>
I've got to the point of building out the default vhost and used that to <br>
create a second vhost and modifying it to became a full fledged Apache <br>
vhost.<br>
<br>
It is my understand that i still need to complete 3 more steps and i <br>
will have a vhost where the owner of the directories and file will also <br>
be configured as SSH.<br>
<br>
The 3 things I think I need to accomplish:<br>
<br>
1) Add a user and configure it to use SSH.<br>
2) Configure each vhost to use PHP-FPM.<br>
3) Limit the User to the docroot of it's virtual host. (ChrootDirectory)<br>
<br>
I am using a clone of the LAMP server so I am going to remove it and <br>
create another close and start by trying to create a use that has SSH <br>
access and a home directory.<br>
<br>
Then I think I should work on limiting that user to the vhost that is <br>
designated to work with.<br>
<br>
<br>
<br>
Then finish up by installing configuring the vhost to use PHP-FPM.<br>
<br>
Any thought are much appreciated!!<br>
<br>
Keith<br>
<br>
<br>
<br>
On 2024-10-22 07:21, Stephen Partington via PLUG-discuss wrote:<br>
> The sshd pam setting is the one you want to make sure works because<br>
> that appears to link sshd access to valid system users for ssh access.<br>
> <br>
> This is a link to my bog stock login. and any user I create (as a<br>
> system user) can access via SSH. except for root. but root cannot even<br>
> log in at this point.<br>
> <br>
>  Ubuntu Stock sshdconfig [1]<br>
> <br>
> On Tue, Oct 22, 2024 at 2:32 AM Rusty Carruth via PLUG-discuss<br>
> <<a href="mailto:plug-discuss@lists.phxlinux.org" target="_blank">plug-discuss@lists.phxlinux.org</a>> wrote:<br>
> <br>
>> 'for fun' I pasted the text of your email in to chatgpt, it had some<br>
>> interesting advice:<br>
>> <br>
>> Verify User Exists:  - probably not your problem.<br>
>> <br>
>> Check User's Shell: Ensure that the user "default" has a valid<br>
>> shell. You can check the user's entry in /etc/passwd<br>
>> Good suggestion, imho, but you did imply you'd logged in as the<br>
>> user, so this is also (probably) a red herring.<br>
>> <br>
>> Home Directory: Ensure the user "default" has a home directory.<br>
>> <br>
>> SSH Key/Password: If you're trying to log in using SSH keys, ensure<br>
>> that the public key is correctly placed in<br>
>> /home/default/.ssh/authorized_keys and that the permissions are set<br>
>> correctly<br>
>> - since you've not logged in via SSH, this is probably also a<br>
>> herring.<br>
>> <br>
>> However, the suggestion: If you’re using password authentication,<br>
>> make sure the user has a password set  Might be helpful.<br>
>> I'm skipping firewall suggestion.<br>
>> Log Files: Since /var/log/faillog is empty, also check<br>
>> /var/log/auth.log for any messages related to SSH login attempts<br>
>> - very good idea.<br>
>> <br>
>> Three's more, but I'm guessing the log files are the most likely<br>
>> place to start, after the suggestions everyone else gave.<br>
>> <br>
>> On 10/21/24 23:22, Rusty Carruth via PLUG-discuss wrote:<br>
>> The other questions are all great, but can you ssh from the server<br>
>> to itself as the desired user?  That is, ssh theSSHdude@localhost ,<br>
>> which should hopefully rule out network issues ;-)<br>
>> <br>
>> I'll also mention that I had a weird issue with SSH where I could<br>
>> ssh from machine A to machine B, but not from B to A!  THAT turned<br>
>> out to be a netmask issue!  And ChatGPT ALMOST got the answer. You<br>
>> could try your favorite AI to see if it can help, but be sure to<br>
>> give it more info than you think you should - I should have given it<br>
>> the output of ifconfig on both computers and it probably would have<br>
>> caught it....<br>
>> <br>
>> On 10/21/24 18:46, Keith Smith via PLUG-discuss wrote:<br>
>> Hi,<br>
>> <br>
>> I am a little stuck.<br>
>> <br>
>> I am trying to configure a user that will allow me to log into an<br>
>> Ubuntu 24.04lts server via SSH.<br>
>> <br>
>> I created a line : "AllowUsers default" in /etc/ssh/sshd_config<br>
>> <br>
>> Then sudo systemctl restart ssh<br>
>> <br>
>> Try to login and get "client_loop: send disconnect: Broken pipe"<br>
>> <br>
>> sudo tail /var/log/faillog returns nothing.<br>
>> <br>
>> I can SSH into the server from my Kubuntu desktop under the default<br>
>> user created during server o/s install<br>
>> <br>
>> A search says it is probably a network issue.  Does not make sense<br>
>> given I can SSH in using another user.<br>
>> <br>
>> Any thoughts are much appreciated.<br>
>> <br>
>> Keith<br>
>> <br>
>> ---------------------------------------------------<br>
>> PLUG-discuss mailing list: <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
>> To subscribe, unsubscribe, or to change your mail settings:<br>
>> <a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
>> ---------------------------------------------------<br>
>> PLUG-discuss mailing list: <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
>> To subscribe, unsubscribe, or to change your mail settings:<br>
>> <a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
>  ---------------------------------------------------<br>
> PLUG-discuss mailing list: <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
> To subscribe, unsubscribe, or to change your mail settings:<br>
> <a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
> <br>
> --<br>
> A mouse trap, placed on top of your alarm clock, will prevent you from<br>
> rolling over and going back to sleep after you hit the snooze button.<br>
> <br>
> Stephen<br>
> <br>
> <br>
> <br>
> Links:<br>
> ------<br>
> [1] <br>
> <a href="https://drive.google.com/open?id=1VadPv7RzeJZQca89aTi5yIJ5F76V49_gkJ_vGgZCt9U" rel="noreferrer" target="_blank">https://drive.google.com/open?id=1VadPv7RzeJZQca89aTi5yIJ5F76V49_gkJ_vGgZCt9U</a><br>
> ---------------------------------------------------<br>
> PLUG-discuss mailing list: <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.org</a><br>
> To subscribe, unsubscribe, or to change your mail settings:<br>
> <a href="https://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">https://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.<br><br>Stephen<br><br></div>