Wiki
Clone wikisftpgateway-public / Password Login
How to enable password login instead of using SSH Keys
To enable password authentication in SFTP Gateway version 2.0, please see SFTP Gateway 2.0 Enable password login instead of using SSH keys
Although we don't recommend it because it is less secure, there are times when you might want to enable password logins for a particular user. This can be done by doing the following from the command line on your SFTP Gateway instance:
-
If you haven't already done so, run the 'sudo addsftpuser <user>' command. Select 'N' and then press enter when prompted to create a new key.
-
Manually set the users password using the 'passwd' command like so
$ sudo passwd bob Changing password for user bob. New password: Retype new password: passwd: all authentication tokens updated successfully.
-
Modify the SSH server settings by typing
sudo nano /etc/ssh/sshd_config
-
Add the following text at the very end of the file
Match User bob PasswordAuthentication yes
-
On line 86, change
ChallengeResponseAuthentication
to yes# Change to no to disable s/key passwords ChallengeResponseAuthentication yes #ChallengeResponseAuthentication no
-
Save the
sshd_config
file with ctrl-o, it will display a bar at the bottom of the screen that says "File Name to Write: ", press the enter key -
Exit nano with ctrl-x
-
Restart SSH by typing
sudo service sshd restart
-
User "bob" should now be able to sftp using a password
$ sftp bob@52.202.XXX.XXX bob@52.202.XXX.XXX's password: Connected to 52.202.XXX.XXX. sftp> pwd Remote working directory: /home/bob sftp> bye
Updated