SSH in Linux Using ubuntu [closed]

0

What command do I use for SSH authentication also by user and password to access the server without having the need for this by making encrypted password ""

I installed a server on Amazon and for that I need to access the authenticated key until I enter it quietly, that I created another user and I want to give access to the server without the need of a login key and password that I created from him was informed that I need to enable in ssh server authentification by user and password) I was told that and only one more line of eating I am not finding anywhere ""

    
asked by anonymous 14.09.2015 / 21:07

2 answers

0

First of all, I suggested that you do not use user authentication / password for security reasons. Key authentication should be the preferred method.

Now, by answering your question, you can use a Match block and the PasswordAuthentication directive in the sshd_config file (usually in / etc / ssh / sshd_config) to select users for whom you want to allow authentication by name of user / password. To do this, add the following to the end of the file :

PasswordAuthentication no

Match User fbasilio
    PasswordAuthentication yes

This will disable username / password authentication for all users except fbasilio .

Then you just have to restart the service (for example, /etc/init.d/sshd reload or ubuntu service ssh restart )

The reason you should add this to the end of the file is because if all the criteria in the Match block are checked, then this will affect all the lines until the next Match or end of the file.

More information on link

    
14.09.2015 / 23:33
1

I usually copy the public RSA key from my local computer to the authorized keys on my remote server, so just type ssh user@ip to connect directly.

To do this, run the command below:

cat ~/.ssh/id_rsa.pub | ssh user@ip "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"
  

Replace user@ip with the correct values.

Now run the command below to login:

ssh user@ip

Simple like this: D.

    
15.09.2015 / 00:12