Create ssh key user

sudo /usr/sbin/useradd ravindra;
sudo sh -c echo “‘somepass’ | passwd ravindra –stdin”;
sudo sh -c echo “‘somepass’ > /home/ravindra/.passwd”;
sudo mkdir /home/ravindra/.ssh;
sudo sh -c echo “‘my key’ > /home/ravindra/.ssh/authorized_keys”;
sudo chmod 700 /home/ravindra/.ssh;sudo chmod 600 /home/ravindra/.ssh/authorized_keys;

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>