I did open the link, but when it didn't provide any real context and was him quickly scrolling through directories I was uninterested in starting/pausing the video. Maybe that's on me, sure.
I'm surprised how many people in this thread don't find 20GB enough. On both of my systems I use ~12GB space on / with just under 900 packages installed. u/jdfthetech asks the right question, do you ever remove the old package cache on your system? I use two pacman hooks, one for removing old cache and one for removing orphaned packages. You can read more about pacman hooks on the wiki.
No, one of the main points of SSH keys is not needing the password. It's an alternate method of authentication. It's the easiest means for system administrators to allow/deny access to an arbitrarily large amount of people without giving them the password. The additional inherent benefit of this when utilized with PasswordAuthentication no is if you revoke one person's key you don't need to change the password and then also notify all existing allowed users of this password change. Better yet, even if this now-revoked user had the password, like in the case of sudo privileges, it's now no good to them even if it's unchanged on the system because PasswordAuthentication no prevents them from logging in regardless.
Accepting the host verification is not the same thing.
how would i get the keys to the pc?
SSH keys are copied to remote hosts via ssh-copy-id user@host, but this still will not work if PasswordAuthentication no is set. The only way around this is to either: get the public key to your the other PCs some other way (email, whatever), or temporarily allow password auth then disable it again after.
Yep, the daemon needs to start for the children to spawn. I confirmed this by modifying my own configs, and also tried replacing all my configs with the text you provided in the beginning of the thread.
I guess I should have started with this and not assumed it - do the other devices on your network have the public key of your main pc? If they don't, and you have PasswordAuthentication no set in the remote sshd configs, you won't be able to connect to them.
Depending on your SSH config on the laptop that could also mean you don't have permission to login as that user or that user has no password. Are you trying to ssh as root, because it's possible PermitRootLogin no is set. Trying add adding -v flag (add a couple if you want) to get a better understanding which step the session is failing at.
Do you have another terminal installed to verify? I can't replicate the issue with st, or urxvtc for that matter, but perhaps it's worth installing another terminal to check if the problem persists or not.
I tried this again this morning, stole your provided configs, this time also using urxvtd/c and when I launch i3 my prompt looks like you expect it to and at SHLVL 2.
Do you have anywhere else PS1 is set in your home dir that's hiding from you?
Yeah, could be. How are you spawning urxvt instances, I assume through some keybind but are you running urxvt or urxvtc? Not sure it matters though, when I try either SHLVL is always 3 even though it's 2 in st.
I never really gave much thought to shell levels, except in the specific instance of entering sub-shells for pipes or by running bash explicitly, but now I have another rabbit hole to investigate for my own sanity and knowledge.
Those seem to be the correct steps. You'll also need network-manager-applet if you need/want a tool on the status bar of your DE (if you're running one).
What do you mean 'options for this purpose'? Are you asking what graphical live arch isos exist? You could make your own archiso with a graphical environment installed.
Hmm...I'm pretty stumped. I replaced my files with what you've provided here, and I'm unable to replicate the addition of user@host:~. However when I login from tty1 I'm brought to i3, i start st via dmenu, and with your use of SHLVL (i've never heard of this until now) I'm already at lvl 3. So perhaps there's something to that? Though if I SSH into the VM, rather than log in in the graphical session, I'm at lvl 1 and still don't have the un-bracketed user@host:~ when I arrive.
I have a sense what's happening is you have a bunch of files at play and they're either getting sourced in the order you don't expect, or some aren't getting sourced at all.
For me the following happens, the files are loaded in this order. Here are all the relevant bits, hopefully this makes sense:
....
# Start X-Org on login
if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi
.xinitrc
....
exec i3
when I start my i3 session it looks like what you expect it to look like, no user@host:~. Granted I'm using st, but the terminal shouldn't matter in this instance since it has nothing to do with bash variables.
In fact if I log in to TTY2, where no graphical system starts and I . .bashrc, the prompt looks as it should.
So the issue is the newline above [user@pwd], yes? I don't think PROMPT_COMMAND is responsible for this, because if I define PRMOPT_COMMAND as export PROMPT_COMMAND='echo hi' I get the following (note the newline is still there):
I'm not sure what you're asking - have you set a nonstandard PROMPT_COMMAND, and the first launch of your terminal instead sources something else? And, the reason you know there's an issue is because there's supposed to be a newline somewhere (presumably at the end) that's not there? Also, are you spawning urxvt child processes? Like u/fitfulpanda said, we'd need to see your .bashrc and also your .profile if you have one and there's configuration there.
You could manually recreate the steps in the PKGBUILD once the repo is downloaded. The point of starting from scratch though is to ensure everything's as intended (and tested) from the packager/maintainer.
Like others have said, I don't back up my install rather I back up my configurations and my actual user data. Config files are version-controlled via git, so no problem there. User data is stored on my home backup server (literally just a lenovo thinkcentre with arch installed in RAID0). When I'm generating important files I'll rsync them there periodically and when I'm done. If I'm editing existing important files I'll sshfs the directory from my backup server to the machine I'm working on. I have a separate backup of all of this data, but it's not in a completely separate location, but at the very least far enough away I feel safe from all reasonable "bad times".
Also:
so that hackers and the NSA can't access your data
If the NSA wants yours/my data, they can probably get it. Few people have the skillsets to thwart them. Sure maybe you've encrypted it and they can't get it programmatically, instead they'll just social engineer you or water board you until you give them the password :).
I did open the link, but when it didn't provide any real context and was him quickly scrolling through directories I was uninterested in starting/pausing the video. Maybe that's on me, sure.
I'm surprised how many people in this thread don't find 20GB enough. On both of my systems I use ~12GB space on
/with just under 900 packages installed. u/jdfthetech asks the right question, do you ever remove the old package cache on your system? I use two pacman hooks, one for removing old cache and one for removing orphaned packages. You can read more about pacman hooks on the wiki.If his ssh access is working between all other devices, it's unlikely a permissions issue.
No, one of the main points of SSH keys is not needing the password. It's an alternate method of authentication. It's the easiest means for system administrators to allow/deny access to an arbitrarily large amount of people without giving them the password. The additional inherent benefit of this when utilized with
PasswordAuthentication nois if you revoke one person's key you don't need to change the password and then also notify all existing allowed users of this password change. Better yet, even if this now-revoked user had the password, like in the case of sudo privileges, it's now no good to them even if it's unchanged on the system becausePasswordAuthentication noprevents them from logging in regardless.Accepting the host verification is not the same thing.
SSH keys are copied to remote hosts via
ssh-copy-id user@host, but this still will not work ifPasswordAuthentication nois set. The only way around this is to either: get the public key to your the other PCs some other way (email, whatever), or temporarily allow password auth then disable it again after.Yep, the daemon needs to start for the children to spawn. I confirmed this by modifying my own configs, and also tried replacing all my configs with the text you provided in the beginning of the thread.
I guess I should have started with this and not assumed it - do the other devices on your network have the public key of your main pc? If they don't, and you have
PasswordAuthentication noset in the remote sshd configs, you won't be able to connect to them.Depending on your SSH config on the laptop that could also mean you don't have permission to login as that user or that user has no password. Are you trying to ssh as root, because it's possible
PermitRootLogin nois set. Trying add adding-vflag (add a couple if you want) to get a better understanding which step the session is failing at.Yes. I tried
urxvt,urxvtc, andstand was unable to replicate your issue.Do you have another terminal installed to verify? I can't replicate the issue with
st, orurxvtcfor that matter, but perhaps it's worth installing another terminal to check if the problem persists or not.Interesting. Well, hopefully bash is honoring comments so let's assume that's not it.
I tried this again this morning, stole your provided configs, this time also using urxvtd/c and when I launch i3 my prompt looks like you expect it to and at SHLVL 2.
Do you have anywhere else PS1 is set in your home dir that's hiding from you?
Yeah, could be. How are you spawning urxvt instances, I assume through some keybind but are you running
urxvtorurxvtc? Not sure it matters though, when I try either SHLVL is always 3 even though it's 2 inst.I never really gave much thought to shell levels, except in the specific instance of entering sub-shells for pipes or by running
bashexplicitly, but now I have another rabbit hole to investigate for my own sanity and knowledge.What a time to be alive.
Those seem to be the correct steps. You'll also need
network-manager-appletif you need/want a tool on the status bar of your DE (if you're running one).What do you mean 'options for this purpose'? Are you asking what graphical live arch isos exist? You could make your own archiso with a graphical environment installed.
What happens when you try booting? Do you end up in a grub rescue, or do you get nowhere at all?
Hmm...I'm pretty stumped. I replaced my files with what you've provided here, and I'm unable to replicate the addition of
user@host:~. However when I login from tty1 I'm brought to i3, i startstvia dmenu, and with your use of SHLVL (i've never heard of this until now) I'm already at lvl 3. So perhaps there's something to that? Though if I SSH into the VM, rather than log in in the graphical session, I'm at lvl 1 and still don't have the un-bracketeduser@host:~when I arrive.I have a sense what's happening is you have a bunch of files at play and they're either getting sourced in the order you don't expect, or some aren't getting sourced at all.
For me the following happens, the files are loaded in this order. Here are all the relevant bits, hopefully this makes sense:
.bashrc
.bash_profile (this is the only line in the file)
.profile
.xinitrc
when I start my i3 session it looks like what you expect it to look like, no
user@host:~. Granted I'm usingst, but the terminal shouldn't matter in this instance since it has nothing to do with bash variables.In fact if I log in to TTY2, where no graphical system starts and I
. .bashrc, the prompt looks as it should.So the issue is the newline above
[user@pwd], yes? I don't think PROMPT_COMMAND is responsible for this, because if I define PRMOPT_COMMAND asexport PROMPT_COMMAND='echo hi'I get the following (note the newline is still there):I assume the \n at the beginning of your PS1 is desired, yeah?
I'm not sure what you're asking - have you set a nonstandard PROMPT_COMMAND, and the first launch of your terminal instead sources something else? And, the reason you know there's an issue is because there's supposed to be a newline somewhere (presumably at the end) that's not there? Also, are you spawning urxvt child processes? Like u/fitfulpanda said, we'd need to see your .bashrc and also your .profile if you have one and there's configuration there.
You could manually recreate the steps in the PKGBUILD once the repo is downloaded. The point of starting from scratch though is to ensure everything's as intended (and tested) from the packager/maintainer.
Like others have said, I don't back up my install rather I back up my configurations and my actual user data. Config files are version-controlled via git, so no problem there. User data is stored on my home backup server (literally just a lenovo thinkcentre with arch installed in RAID0). When I'm generating important files I'll rsync them there periodically and when I'm done. If I'm editing existing important files I'll
sshfsthe directory from my backup server to the machine I'm working on. I have a separate backup of all of this data, but it's not in a completely separate location, but at the very least far enough away I feel safe from all reasonable "bad times".Also:
If the NSA wants yours/my data, they can probably get it. Few people have the skillsets to thwart them. Sure maybe you've encrypted it and they can't get it programmatically, instead they'll just social engineer you or water board you until you give them the password :).
If you're an ansible guy you can try my installer. I developed it to quickly spin up dev vms.
Seconding what u/mistersincide is saying, also check for the following line in /etc/sudoers:
@includedir /etc/sudoers.d
If that's not in there, and you have your user perms defined in a file in /etc/sudoers.d as you say, then you'll run into problems.
Do you have any .pacnew files for sudoers?
You don't need to give
sudoaccess to root. You should just be able topacman -Syuas root.