Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Shokoofeh

Re:Connection is always refused by Ubuntu in a Virtual Machine (Hyper-V)

Hi,
first run this command in linux
sudo apt-get install openssh-server
then on winscp use sftp instead of ftp and set the port to 22.
manda3d

Step 1 - Enable connection
https://askubuntu.com/questions/890763/connection-to-ftp-always-refused
# Backup the current configuration file. (optional)
sudo mv /etc/vsftpd.conf /etc/vsftpd.backup
 
# Uninstall vsftpd and purge the configuration files.
sudo apt-get remove --purge vsftpd
 
# Lastly, re-install vsftpd.
sudo apt-get install vsftpd
 
# Test
ftp -p x.x.x.x

The default password for the user 'ubuntu' on Ubuntu is blank.

Step 2 - Permission to edit the file /etc/vsftpd.conf
https://askubuntu.com/questions/150028/you-are-not-the-owner-message-when-trying-to-access-folder
sudo chown -R username /path/to/directory

Example:
sudo chown -R ubuntu /etc/vsftpd.conf


Step 3 - Enable writing
https://askubuntu.com/questions/410947/permission-denied-in-ftp-even-though-im-the-owner
In the file "/etc/vsftpd.conf", uncomment the line
#write_enable=YES

Important:
Watch this video how to change the file permission in Terminal instead of using a Text Editor:
https://www.youtube.com/watch?v=qpt5mxVVJoE
sudo su
vi /etc/vsftpd.conf
 
ESCAPE :wq (to exit)


Save the file and restart vsftpd with sudo service vsftpd restart
manda3d

Connection is always refused by Ubuntu in a Virtual Machine (Hyper-V)

Hi, I'm new, I watched so many YouTube Tutorials but they just enter the IP address without explaining how did they get it.

Host name:
I tried to intentionally fake the IP address, for example 172.25.160.66 instead of 172.25.160.65 then the result is "Network error: Connection time out" instead of refused, which means that the IP address exists but just refused.

Username and password:
People say that the default username and password of Ubuntu are nothing, so I just type nothing for them.

WinSCP: Version 5.19.1 (Build 11552)

To zoom the image below, right click and image in new tab.