Monday, March 16, 2020

 

How to Configure a Password-less SSH 

1) Create the key pair using the command ssh-keygen

2) The default key pair is  ~/.ssh/id_rsa (private key) and ~/.ssh/id_rsa.pub (public key) 

3) Copy the public key in clipboard using the command pbcopy < ~/.ssh/id_rsa.pub

4) On the remote server append your copied public key 

pbpaste > ~/.ssh/authorized_keys

5) SSH into remote server without password ssh -i ~/.ssh/id_rsa <remote_server_name>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#on local machine

ssh-keygen

pbcopy < ~/.ssh/id_rsa.pub
  

#on remote server

pbpaste > ~/.ssh/authorized_keys

#on local machine

ssh -i ~/.ssh/id_rsa <remote_server_name>

Refer to documentation to learn more about SSH.




Sunday, March 15, 2020

 


How to Install phpMyAdmin on MacOS

1) Install Homebrew (Package Manager for MacOS(or Linux).

2) Run "brew install phpmyadmin".

3) Add the following lines to httpd.conf and restart Apache.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Alias /phpmyadmin /opt/homebrew/share/phpmyadmin
  ...
<Directory /opt/homebrew/share/phpmyadmin/ >
  
Options Indexes FollowSymlinks Multiviews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IFModule !mod_authz_core.c>
Order allow deny
Allow from all
</IfModule>

</Directory>

4) Open http://localhost/phpmyadmin.

The configuration file is /opt/homebrew/etc/phpmyadmin.config.inc.php 

Refer to the documentation for more information.