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

Advertisement

manda3d
Joined:
Posts:
2

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.


Last edited by manda3d on 2021-07-07 07:30; edited 2 times in total

Reply with quote

Advertisement

manda3d
Joined:
Posts:
2

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

Reply with quote

Shokoofeh
Guest

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.

Reply with quote

Advertisement

You can post new topics in this forum