-1

I have created a new ec2 instance and installed ftop on it i can able to access it through putty and winscp suddenly, once when i try to open through winscp it is giving error as

  1. The server rejected SFTP connection, but it listens for FTP connections. Did you want to use FTP protocol instead of SFTP? Prefer using encryption.

    and through putty it is showing as CONNECTION REFUSED i even tried restarting the instance may i know what is the problem it is very important for me kindly help.

Nikitha
  • 11
  • 3
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Web Applications Stack Exchange](http://webapps.stackexchange.com/), [Webmaster Stack Exchange](http://webmasters.stackexchange.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Jun 15 '17 at 16:15

3 Answers3

1

Make sure the FTP ports that you are trying to access on the machine are enabled by the inbound security group rules.

This answer should help you out further inbound security group

Also double check to make sure your EC2 machine doesn't have a firewall that may be blocking connections that are allowed by your inbound security policy

Pandelis
  • 1,434
  • 9
  • 17
  • i tried changes the security group but it is giving me the same error in putty an winscp please help me out with this – Nikitha Jun 15 '17 at 14:49
1

If you want to access your Linux EC2 server instance via Putty or WinSCP, and you find that you can no longer successfully establish a connection to it, you can do the following in your EC2 AWS Console:

1) Go to the left panel of your EC2 AWS Console, Network & Security -> Security Groups -> <your security group name>

2) In the Inbound tab, click "Edit".

3) Go to column "Type", row "SSH".

4) Go to column "Source" of row "SSH", click the "Custom" dropdown field.

5) Select "My IP".
--> Doing this should automatically update your present public IP address setting in AWS.

Take note that your public IP address may change from time to time, depending on your ISP (Internet Service Provider).

Having said this, whenever it does change, you should be able to resolve this issue by redoing steps 1 - 5.

Hope this helps!

Thank you!

Peace.

masarapmabuhay
  • 298
  • 1
  • 4
  • 10
0

it might be ssh service interrupted. did you try to change permission in home directory..? If .ssh/ folder permission changed, you can not connect instance. you can try shutdown then start instead of restart. If it is not working, Please create AMI Image of that server, then try to launch new instance from that image. definitely it will work.