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.
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.
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.
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.
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. :)
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.
Using both can prevent human error better with layered defence.
No, because a login only requires one of them, and a password is much weaker protection. Having both a password and public-key authentication uses the former to undermine the latter.
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
}
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."
... 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.
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.
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.
Post the series of events and commands that led to this outcome. Leave nothing to the imagination.
I block trolls. * plonk *
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.
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.
No audio. SimpleScreenRecorder provides audio as well.
I can think of a reason for that, but this conversation has run its course. Public-key authentication is in every way superior.
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:
This will print a lot of debugging information, some of which may help in decoding the reason for the failure.
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.
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.
If you're recording the screen, use SimpleScreenRecorder, which records the entire screen plus sound. The results are first-rate.
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. :)
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.
Almost right, but s/server/client/. The private key is located on the client. The public key is located on the server.
No, because a login only requires one of them, and a password is much weaker protection. Having both a password and public-key authentication uses the former to undermine the latter.
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:
This is not correct. Compare:
mycoolandcomplexpassword
-- to --
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIY3q3eXqnv3d3f8ZQQ6HIZiRF7s4ruqHJv6bCzqgY8Nf/wDiSH6fkWUGJFR6pjib+MKXtOx0DHYleEUZRUDuLo= root@hostname
This is why passwords must be disabled.
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."
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.
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.
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.
You can run it as a service owned by root. Or you can create user-level services, where controlling them doesn't require root authority.
Hard to believe but true -- available only as a Snap. Including versions for Mint, whose developers have dropped Snaps entirely.
This is a huge tactical error on the part of this app's developers.
Thanks for this example of where things are going. :)
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:
The idea is you first log onto the server (preferably locally) by running this command:
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.
Good question. If you don't develop programs or edit videos, that's probably larger than necessary.
Based on present information, yes, probably.
Yes, if you can install your games into your user environment, this argues for a larger /home partition.
It's a difficult choice, once made you're sort of stuck with it. And it's better to have space you don't need, than need space you don't have.
Really?
How to Install NTP Server and Client(s) on Ubuntu 20.04 LTS
Already provided in spades, to anyone willing to read. I block trolls. * plonk *
Please don't tell us what you tried, show us what you tried. Post the commands you issued and the system's responses.