Daily Archives: 2 October 2017


CentOS 6: install / start and stop / enable and disable ssh server

Install

To install the openssh-server, you need to install the openssh-server package:

sudo yum install -y openssh-server;

Start

To start the sshd daemon (openssh-server) in the current session:

sudo service sshd start;

Stop

To stop the active (if any) sshd daemon in the current session:

sudo service sshd stop;

Enable

To configure the sshd daemon to start automatically at boot time:

sudo chkconfig sshd --add;
sudo chkconfig sshd on --level 2,3,4,5;

Disable

To configure the sshd daemon to stop automatic initialization at boot time:

sudo chkconfig sshd off;
sudo chkconfig sshd --del;

Git: Perform a stash addition using a custom/meaningful message

Did you ever wonder “Is there more to git stash?”, we did!
We wanted to see if there is a way to manually set the stash message to something meaningful instead of the automated message that derives from the last commit.

Fortunately, there is the command git stash save "Meaningful message"; which allows you to add new changes in your stash and at the same time use a custom message.

By using the git stash save "custom message"; command you will be enhancing the results of the git stash list; command as it will contain more useful information for you.

Example

$ git status;
On branch master
Changes not staged for commit:
 (use "git add <file>..." to update what will be committed)
 (use "git checkout -- <file>..." to discard changes in working directory)

modified: me

no changes added to commit (use "git add" and/or "git commit -a")
$ git stash save "custom message";
Saved working directory and index state On master: your message here
$ git stash list 
stash@{0}: On master: custom message
$ git stash show
 me | 1 +
 1 file changed, 1 insertion(+)