Skip to content

u/lutusp

In this archive from Mar 2016 to Sep 2022

5
posts
11k
comments
2
media
20k
score

You're asking how to put the genie back in the bottle. Someone else who did exactly the same thing without making a backup of the original configuration file, solved this by mounting the installer ISO, extracted the default /etc/apt/sources.list and replaced the scrambled copy he had created.

1 points

Okay, let's do the math.

Assume the password must be memorized. So 18 characters with some internal order to assist memorization. For upper and lowercase that's 5218 = 7.7... * 1030 , but remember that a dictionary search will likely reduce this because the password may consist of some words or parts of words.

Compare this to an SSH encryption key, an ECDSA, which has 140 hexadecimal characters. That's 16140 = 3.7... * 10168

Directly comparing the two, without taking the dictionary attack vulnerability into account: 3.7 * 10168 / 7.7 * 1030 = 4.8 * 10137 times more possible states in the ECDSA than the password.

There are between 1078 to 1082 atoms in the observable universe -- source. Taking the lower estimate of 1078 : the number of states in a typical SSH encryption key, divided by the number of possible password states, is 4.8 * 1059 times greater than the number of atoms in the universe.

There is no possible basis for comparison.

14 points

Possibilities:

  • The user's password on the new server isn't the same as it was on the old server.

  • The user's Secure Shell public key has not been transmitted to the new server.

  • The user's ~/.ssh directory on the server has the wrong permissions.

  • There is no user account on the server for the user who is trying to log on.

  • Based on the uid and euid both being zero, the client is trying to log on as root, and root logins are disabled in a new, default SSH configuration.

  • All of the above.

To find out what is going on, run this client login method:

$ ssh -vvv username@hostname

This will print a lot of debugging information, some of which may help in decoding the reason for the failure.

1 points

The answer is:

  • A key password doesn't afford any significant protection, because if a hacker has gained access to your home directory, he can attack your encryption key passwords with massively parallel password attacks.

  • Secure Shell password authentication is much weaker than public-key authentication because an encryption key is far more complex than any password.

This covers both kinds of password. Public-key authentication affords far more security than either or both kinds of password.

4 points

If you're asking if an encryption key can be given a separate password, yes, an encryption key can be given a password of its own. This feature is not often used, it being regarded as overkill, because if a hacker has penetrated a user's home directory, he can copy the key and hit it with a very high speed, massively parallel process to get the key in a short time.

Unless I don't understand your question.

3 points

If you're recording the screen, use SimpleScreenRecorder, which records the entire screen plus sound. The results are first-rate.

$ sudo apt install simplescreenrecorder

Using ffmpeg for this requires that you learn the very complex and arcane ffmpeg setups/arguments to a degree that you will no longer belong to the world of mortal beings any more. :)

6 points

Uh, I don't know what you are talking about.

Yes. That's clear. I now think you're talking about key passwords, not user passwords. But with key passwords, this undermines the basic idea of public-key authentication, where no password entry is required at all. That allows automatic backups at timed intervals, and similar things. The trust relationship between the server and client allows this convenience, while preserving the integrity of the transmitted data.

And again, if you allow logon passwords, hackers will exploit this vulnerability until they guess the password, by hitting the server day and night, 24/7 until they succeed. This doesn't work for cryptographic-strength keys and the absence of even a logon prompt.

0 points

I am wondering if there is a way I can dynamically tell where to store the desktop settings based on the OS that a user is using so I can isolate the environment somewhat.

The desktop settings are located in the "dotted" directories under the user home page directory. So you could archive and restore those directories, using this bit of logic:

$ uname -a | grep -iq ubuntu && {
      # Ubuntu actions here
   } || {
      # CentOS actions here
   }
1 points

Proper security would be key and passphrase.

This is not correct. Compare:

mycoolandcomplexpassword

-- to --

ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIY3q3eXqnv3d3f8ZQQ6HIZiRF7s4ruqHJv6bCzqgY8Nf/wDiSH6fkWUGJFR6pjib+MKXtOx0DHYleEUZRUDuLo= root@hostname

This is why passwords must be disabled.

It's not a big deal to still use your password.

Just not correct. What is SSH Public Key Authentication? : "The motivation for using public key authentication over simple passwords is security. Public key authentication provides cryptographic strength that even extremely long passwords can not offer."

6 points

... however when trying to use terminal emulator over xrdp it says I have to add user to sudoers.

It's simpler to add the user to the sudo group on that machine. Sudo authority isn't portable between systems -- it has to be enabled on each one individually.

$ su
# usermod -a -G sudo username

This two-step process is needed because the logged-in user doesn't have 'sudo' rights yet. And after this change, that user must log out and in again.

One more thing -- 'su' requires the root password. 'sudo su' only needs the user password.

1 points

Start by installing Termux, a really terrific Android application that gives you a Linux terminal environment.

There are also ways to get a Linux desktop, but these are less elegant than the Termux environment, which is a classic Linux experience.

BTW don't install the Google Play Termux version, install from the Github page (link above). The Google Play version is now rather crippled because of mandatory changes in Android and Google's changing policies.

6 points

Is having key only SSH enough security to open my ssh port?

Can't actually decode your post, but "public-key authentication", where the server has a copy of your public key, is a very good form of security, but only after you have made these two changes to your /etc/ssh/sshd_config file:

PasswordAuthentication no
ChallengeResponseAuthentication no

The idea is you first log onto the server (preferably locally) by running this command:

$ ssh-copy-id username@servername

Enter you password one last time, after which the server won't require any more password entries from you. Then make the above listed edits, which will prevent hackers from trying to guess your password.

Only then do you open the SSH port to the wider world -- after you have prevented password logins entirely.

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