Note! 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_configAdd the following text at the very end of the file
Match User bob PasswordAuthentication yesOn line 86, change
ChallengeResponseAuthenticationto yes# Change to no to disable s/key passwords ChallengeResponseAuthentication yes #ChallengeResponseAuthentication noSave the
sshd_configfile with ctrl-o, it will display a bar at the bottom of the screen that says "File Name to Write: ", press the enter keyExit nano with ctrl-x
Restart SSH by typing
sudo service sshd restartUser "bob" should now be able to sftp using a password
<span class="err"> lt;/span> <span class="n">sftp</span> <span class="n">bob</span><span class="mf">@52.202</span><span class="p">.</span><span class="n">XXX</span><span class="p">.</span><span class="n">XXX</span> <span class="n">bob</span><span class="mf">@52.202</span><span class="p">.</span><span class="n">XXX</span><span class="p">.</span><span class="n">XXX</span><span class="err">'</span><span class="n">s</span> <span class="nl">password</span><span class="p">:</span> <span class="n">Connected</span> <span class="n">to</span> <span class="mf">52.202</span><span class="p">.</span><span class="n">XXX</span><span class="p">.</span><span class="n">XXX</span><span class="p">.</span> <span class="n">sftp</span><span class="o">></span> <span class="n">pwd</span> <span class="n">Remote</span> <span class="n">working</span> <span class="nl">directory</span><span class="p">:</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">bob</span> <span class="n">sftp</span><span class="o">></span> <span class="n">bye</span>b8af8232-d344-4486-a4dd-5490c5d08feb