SFTP Access denied problem

Abdullah Alayed 21 Reputation points
2022-01-02T04:37:46.447+00:00

I have installed SSH Services
161660-image.png

Then I tried to connect to the SFTP, i got this error :
161771-image.png

Status: Using username "sftp".
Status: Access denied
Error: Authentication failed.
Error: Critical error: Could not connect to server

System Center Virtual Machine Manager
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Cristian SPIRIDON 4,486 Reputation points Volunteer Moderator
    2022-01-02T07:45:37.63+00:00

    Hi,

    There might be some config issues.
    There was a similar question asked about sftp on windows:
    https://learn.microsoft.com/en-us/answers/questions/425437/sftp-in-windows.html

    Maybe that will help you fix the config issue. And don't forget to configure the firewalls.

    Hope this helps!

    0 comments No comments

  2. Abdullah Alayed 21 Reputation points
    2022-01-02T14:28:38.657+00:00

    error with local user:

    Connection reset by ::1 port 22
    Connection closed

    ---
    error with administrator user:

    Permission denied, please try again.

    161791-image.png

    0 comments No comments

  3. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2022-01-03T13:09:58.923+00:00

    abedohabedoh-0487, To better assist you/help point you in the right direction - since you have ‘azure-webapps’ tag added. Just to clarify, are you leveraging Azure App Service WebApp?

    If it’s Azure WebApp, you may connect to the container directly from your local development machine using either SSH or SFTP.

    For a direct SSH session with your container, your app should be running.
    Paste the URL https://{yourapp-name}.scm.azurewebsites.net/webssh/host into your browser and replace {yourapp-name} with your app name.

    You need to make sure your app container is enabled for SSH access, and run the same remote-connection create command to establish a TCP tunnel.

    Typically, If you don’t have one, install a SFTP client such as WinSCP, connect the client to localhost at 127.0.0.1 and a port number that is created for TCP tunnel, use the SSH user name and password to login. Now you can manage the site content stored in /home/site/wwwroot using the SFTP client.

    See, How do I configure my dev machine for SSH/SFTP and remote debugging? (SSH Experience and Remote Debugging for Linux Web Apps)

    Authenticating to an FTP/FTPS endpoint using user-scope credentials requires a username in the following format: <app-name>\<user-name>
    Since user-scope credentials are linked to the user and not a specific resource, the username must be in this format to direct the sign-in action to the right app endpoint.

    0 comments No comments

  4. AlexZhu-MSFT 6,591 Reputation points Moderator
    2022-01-04T00:48:17.66+00:00

    Hi,

    Please check if the following directives exist in %programdata%\ssh\sshd_config, if yes, comment them both, restart openssh service (for the changes to take effect) and try again.

    AllowUsers
    AllowGroups

    The two directives are restrictions for sftp users (the logic between them is AND), if we comment them, the restriction is removed, that is, any users can use sftp.

    162053-openssh-config.png

    Alex

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  5. Abdullah Alayed 21 Reputation points
    2022-01-05T20:07:57.267+00:00

    no one helps me.

    guys come on i want to use SFTP please :(

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.