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.

Monday, February 17, 2020

How to Remove and Ignore .DS_Store file from Git Repo

 

 

1)  Remove the existing .DS_Store files from the repository 
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch.
2) Add the line .DS_Store to .gitignore file

echo .DS_Store >> .gitignore

3) Commit the .gitignore to the repository

1
2
3
4
5
6
7


git add .gitignore


git commit -m ".DS_Store files ignored"
  

Refer to documentation to learn more about .gitignore