Skip to content

u/TopDownTom

In this archive from Nov 2018 to Mar 2023

4
posts
910
comments
2
media
2.7k
score

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.

10 points

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.

5 points

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.

3 points

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.

2 points

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.

3 points

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?

[main@~]
[gen (1.0)]:: grep -RIns PS1 . | grep -v history
./.bashrc:28:PS1='[\u@\h \W]\$ '
./.bash_prompt:25:   export PS1="\n$LO_BLUE[$HI_RED\u${LO_CYAN}@${HI_GREEN}\w$LO_BLUE]\n$LO_BLUE[$LO_RED\h$LO_BLUE]::$R "
./.bash_prompt:28:   export PS1="\n${LO_WHITE}[${USERCOLOR}\u${LO_GREEN}@${HI_GREEN}\w$LO_WHITE]\n$LO_WHITE[${HOSTCOLOR}\h${LO_WHITE} ($SHLVL.\j)]::$R "

[main@~]
[gen (1.0)]::
1 points

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.

1 points

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.

1 points

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

....
PS1="\n${LO_WHITE}[${USERCOLOR}\u${LO_GREEN}@${HI_GREEN}\w$LO_WHITE]\n$LO_WHITE[${HOSTCOLOR}\h${LO_WHITE} ($SHLVL.\j)]::$R "

.bash_profile (this is the only line in the file)

[[ -f $HOME/.profile ]] && . $HOME/.profile

.profile

....
# 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.

1 points

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):

[main@gen ~]$ . .bashrc

[main@~]
[gen (1.0)]:: vib

[main@~]
[gen (1.0)]:: . .bashrc
hi

[main@~]
[gen (1.0)]::

I assume the \n at the beginning of your PS1 is desired, yeah?

1 points

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.

1 points

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 :).

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.