InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Ssh tutorials

  • Create ssh public/private keys on command line
  • Check if an ssh key has passphrase
  • Connect to mysql server using ssh port forwarding
  • Display keys added to ssh-agent using ssh-add
  • Find authentication methods an ssh server supports
  • Generate ssh public key from private key
  • Linux - how to enable password login on ssh server
  • Linux - ssh agent forwarding when using bastion host
  • Prevent ssh session freezing due to timeout
  • Remove passphrase from ssh private key
  • Ssh port forwarding to surf a site from different location
 
  • Home
  • > Tutorials
  • > Linux/Unix Command Line
  • > SSH

Linux – how to enable password login on ssh server

By admin on Nov 28, 2015

By default password based on login may be disabled on you Linux Server. Even though it is better to use private and public key for remote ssh login, there are times you need to use password based login. Here are steps to enable password login on Ubuntu Linux. For other flavours of Linux, the process should be similar.

Check ssh supported methods

Check ssh supported methods using:

$ ssh -o PreferredAuthentications=none localhost
Permission denied (publickey).

If password is not present in supported methods in brackets above, that means ssh server does not support password based authentication.

Edit PasswordAuthentication value in sshd_config

Open /etc/ssh/sshd_config using sudo

$ sudo vi /etc/ssh/sshd_config

Change PasswordAuthentication value to yes

PasswordAuthentication yes

Restart ssh

Restart ssh using the following command:

$ sudo service ssh restart
ssh stop/waiting
ssh start/running, process 7068

Now check supported methods again:

$ ssh -o PreferredAuthentications=none localhost
Permission denied (publickey,password).

This time you should see password in supported methods.

Suggested posts:

  1. Find authentication methods an ssh server supports
  2. How to check if a user has password on Linux
  3. Linux – how to add a user using useradd
  4. How to add a user on Linux with sudo access
  5. Linux how to modify a user using usermod
  6. Linux – how to run a command as different user
  7. Ssh automation on Amazon EC2 Ubuntu Linux
  8. How to connect to mysql server using ssh port forwarding
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Devops, Linux, SSH, Tutorials, Ubuntu Linux

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2022 InfoHeap.

Powered by WordPress