skip to main | skip to sidebar

Linux Tutorial for Beginners

Pages

  • Home
 
  • RSS
  • Twitter
Friday, February 15, 2013

SSH login without password

Posted by Raju Gupta at 4:52 AM – 2 comments
 

The following steps can be used to ssh from one system to another without specifying a password:


1. On the client run the following commands:

$ mkdir -p $HOME/.ssh   
$ chmod 0700 $HOME/.ssh   
$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''  


This should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key).

2. Copy $HOME/.ssh/id_dsa.pub to the server.

3. On the server run the following commands:

$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2   
$ chmod 0600 $HOME/.ssh/authorized_keys2   

Depending on the version of OpenSSH the following commands may also be required:

$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys   
$ chmod 0600 $HOME/.ssh/authorized_keys   

An alternative is to create a link from authorized_keys2 to authorized_keys:

$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys

4. On the client test the results by ssh'ing to the server:

$ ssh -i $HOME/.ssh/id_dsa server


Labels: ssh Email This BlogThis! Share to X Share to Facebook

2 Responses so far.

  1. Unknown says:
    April 30, 2018 at 2:55 AM

    Informative blog .... Thank you for sharing this information with us ...

    Selenium training | Selenium training in chennai

  2. Durga IT Solutions says:
    August 13, 2019 at 11:31 PM
    This comment has been removed by the author.

Leave a Reply

Newer Post Older Post
Subscribe to: Post Comments (Atom)

Our Blogs

  • Java Programs with Output
  • C Programming Tutorial
  • Language Tutorial
  • Android Development Tutorial
  • Web Development Tutorial
  • Popular
  • Recent
  • Archives

Popular Posts

  • Apache Configuration File Security Option
    you’ll examine the security options available in the main Apache configuration file, httpd.conf. That file can be modified to secure the e...
  • AWS VPC Overview
    What is VPC ? A virtual private cloud (VPC) is a virtual network dedicated to your AWS account. It is logically isolated from other vir...
  • SSH login without password
    The following steps can be used to ssh from one system to another without specifying a password: 1. On the client run the following com...
  • Advantages & Disadvantages of Kerberos
    Advantages of Kerberos Most conventional network services use password-based authentication schemes. Such schemes require a user to au...
  • Apache Installation and Configuration through source code
    In this example we extract the source code to a directory under /usr/local/src/ cp httpd-2.0.46.tar.gz /usr/local/src cd /usr/local/src...
  • How to automatically chroot jail selected ssh user logins
    1. Creating basic chroot environment First we need to create a simple chroot environment. Our chroot environment will consist of a bash she...
  • Apache and SELinux File Labels
    Take a look at the SELinux settings associated with Apache. To review, SELinux settings, as they relate to a service, mostly fall into tw...
  • How to Create the Kerberos database
    Create the database with the following command.  [root@coma ~] kdb5_util create -s This will prompt you for a password. You will ...
  • Kerberos and PAM
    Kerberos-aware services do not currently make use of Pluggable Authentication Modules (PAM) — these services bypass PAM completely. However...
  • History of MINIX 3
    MINIX has a long history. It goes back to 1987 when the first edition of the book Operating Systems: Design and Implementation by Andrew S...
Powered by Blogger.

Archives

  • ►  2014 (1)
    • ►  May (1)
  • ▼  2013 (4)
    • ▼  February (4)
      • SSH login without password
      • How to automatically chroot jail selected ssh user...
      • Apache Installation and Configuration through sour...
      • Tcpdump command with some examples
  • ►  2012 (89)
    • ►  November (1)
    • ►  March (4)
    • ►  February (36)
    • ►  January (48)
 

Followers

Labels

  • Apache (8)
  • aws (1)
  • Bridge (1)
  • cloud computing (1)
  • Configuration (1)
  • dhcp server (7)
  • DNS (8)
  • File system (11)
  • Fping (1)
  • Iptable basic (3)
  • KDC slave server (1)
  • Kerberos (14)
  • kerberos configuration (5)
  • kerberos database (1)
  • LaTeX (1)
  • Ldap basic (2)
  • Linux aliases (1)
  • Linux Commands (4)
  • Linux History (2)
  • Linux Installation (3)
  • Linux kernel (3)
  • Linux shell (2)
  • Linux software (2)
  • Lvm (1)
  • Mail Server (3)
  • Network Script (1)
  • PHP (1)
  • Raid (6)
  • SELinux (1)
  • Sendmail (3)
  • ssh (2)
  • Tcpdump example (1)
  • Virtualization (5)
  • Webmin (1)
  • Yum (2)
 
 
© 2011 Linux Tutorial for Beginners | Designs by Web2feel & Fab Themes

Bloggerized by DheTemplate.com - Main Blogger