User Tools

Site Tools


operating_systems:raspbian:minimal_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
operating_systems:raspbian:minimal_configuration [2019/06/12 06:35] – [sshd_config file] maferreiraoperating_systems:raspbian:minimal_configuration [2019/07/08 15:14] – [sshd_config file] maferreira
Line 2: Line 2:
 ===== Enable root account ===== ===== Enable root account =====
 As root account is disabled by default on raspbian, we need to activate it. But before doing that, mount / in read-write mode. As root account is disabled by default on raspbian, we need to activate it. But before doing that, mount / in read-write mode.
-    # mount -o remount,rw / +  # mount -o remount,rw / 
-    # passwd root+  # passwd root
 And then enter the new password you want. And then enter the new password you want.
-    $ su root+  $ su root
  
 ===== Rename user =====     ===== Rename user =====    
-    # usermod -l acdsn pi +  # usermod -l acdsn pi 
-    # usermod -m -d /home/acdsn acdsn+  # usermod -m -d /home/acdsn acdsn
 Set a password to the user Set a password to the user
-    # passwd acdsn+  # passwd acdsn
  
 ===== Rename group ===== ===== Rename group =====
-    # groupmod --new-name acdsn pi+  # groupmod --new-name acdsn pi
  
 ===== Rename hostname ===== ===== Rename hostname =====
-    # vi /etc/hostname+  # vi /etc/hostname
 Replace the existing hostname by the new one. Replace the existing hostname by the new one.
 ===== SSH connection ===== ===== SSH connection =====
 ====Generate ssh keys==== ====Generate ssh keys====
-    $ ssh-keygen -t rsa -b 2048+  $ ssh-keygen -t rsa -b 2048
  
 Add your public key to the server eG file (/home/acdsn/.ssh/eG). Add your public key to the server eG file (/home/acdsn/.ssh/eG).
Line 27: Line 27:
 ====sshd_config file==== ====sshd_config file====
   # vi /etc/ssh/sshd_config   # vi /etc/ssh/sshd_config
-   + 
-  #ListenAddress 0.0.0.0 -ListenAddress 127.0.0.1 +From 
-  #PermitRootLogin prohibit-password -> PermitRootLogin no + 
-  #PubkeyAuthentication yes -> PubkeyAuthentication yes +  #ListenAddress 0.0.0.0 
-  #PasswordAuthentication yes -> PasswordAuthentication no+  #PermitRootLogin prohibit-password 
 +  #PubkeyAuthentication yes 
 +  #PasswordAuthentication yes 
 + 
 +To 
 + 
 +  ListenAddress 127.0.0.1 
 +  PermitRootLogin no 
 +  PubkeyAuthentication yes 
 +  PasswordAuthentication no
 ====Allow connection from the server==== ====Allow connection from the server====
 Create the **/home/acdsn/.ssh/authorized_keys** file and add the **server public key**. Create the **/home/acdsn/.ssh/authorized_keys** file and add the **server public key**.