Skip to main content

Posts

Showing posts with the label terminal

Some useful SSH Commands

Install SSH Server in Ubuntu sudo apt-get install openssh-server Run SSH Server sudo service ssh restart The output will be like * Restarting OpenBSD Secure Shell server sshd [ OK ] Check SSH Status ps -ef |grep "sshd" The output will be like hduser@d1:/hadoopSetup$ ps -ef | grep "sshd" root 125 0 0 02:35 ? 00:00:00 /usr/sbin/sshd hduser 138 79 0 02:45 pts/2 00:00:00 grep --color=auto sshd

Run docker without sudo

By default, you have to run docker using sudo . When you try to run it without sudo, you will get $ docker images Got permission denied while trying to connect to the Docker daemon socket In order to run without sudo, you will need to do the following steps Add the docker group if it does not already exist sudo groupadd docker Add the user to the docker group. If you want to add the current user, you can just use this sudo gpasswd -a $USER docker If you want to add, say user user1 , then you should just do sudo gpasswd -a user1 docker After you do the above steps, log out and now you can run docker without sudo .