WinSCP connects to Ubuntu. Access closed

I installed Ubuntu13_desktop on VMware (VMware® Workstation 7.1.6) based on Windows 7. Now I want to connect to Ubuntu from Windows 7. Install WMware as Host Only . Installed WinSCP on Windows, configured

protocol: SFTP; Host name: ubuntu; Port: 22; UserName: oracle; Password: ***. 

Click login, it showed

 Searching for host... Connection to host... Authenticating... Using username "oracle" Authenticating with pre-entered password. Access denied. Access denied. 

I will be able to ping Ubuntu using cmd.

Can someone help me to allow me access to Ubuntu using WinSCP? Thanks in advance.

+7
ubuntu winscp
source share
3 answers

Well, port 22 is for SSH service. Therefore, you can probably try installing the openssh server in your ubuntu by typing

sudo apt-get install openssh-server

and then try connecting with the following data:

: Ssh

host name: [computer IP address]

port: 22

username: [username]

password: [password]

Hope this should work.

+15
source share

First look at auth.log on the system.

 cat /var/log/auth.log 

In my case with WinSCP, I found something like this:

 fatal: no matching mac found: client hmac-sha1,hmac-sha1-96,hmac-md5 server hmac-sha2-512,hmac-sha2-256,hmac-ripemd160 [preauth] 

And comment out the line in /etc/ssh/sshd_config :

 MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160 

don't forget to restart ssh :-) Hope this helps someone.

+2
source share

If sshd (openssh-server) is installed and running, but when using WinSCP, there is still no access. In Ubuntu 16.x, view auth logs:

 sudo cat /var/log/auth.log 

I found this:

 No supported authentication methods available [preauth] 

The problem is setting Ubuntu sshd by default to authenticate public / private key for ssh remote access:

 RSAAuthentication yes PubkeyAuthentication yes PasswordAuthentication no 

If you want to skip kay-pair, open the conf sshd file:

 sudo nano /etc/ssh/sshd_config 

Find the above attributes and change to:

 RSAAuthentication no PubkeyAuthentication no PasswordAuthentication yes 

restart sshd:

 sudo systemctl restart sshd 

If you configured the user on an instance of Ubuntu 16.x, you should now be able to use ssh or WinSCP with username / password. Keep in mind that system security is now at greater risk.

0
source share

All Articles