# freebsd 9.0 amd64 in vmware and I make nat after ssh root login access denied



## anorian (Jul 28, 2012)

FreeBSD 9.0 amd64 in vmware and I make NAT after ssh root login access denied.

I make vmware "nat" and after I worked connect with winscp but I get error is "authenticating with pre-entered password. Access denied.

But my password true and I can connect with "Bridged".

But I want connect with "nat".

I wait for help


----------



## zhoopin (Jul 28, 2012)

root is not allowed to login using winscp(scp)/ssh by Default.

Solution 2 (Prefered - Secure):
1. transfer the file as a normal user, then
2. Copy it to /vmimages using the root login from the console.


Solution 1 (not recommended - Unsecure!!!!):
1. Edit /etc/ssh/sshd_config
2. Uncommented and change

```
# PermitRootLogin no
```
to

```
PermitRootLogin yes
```
3. Uncommented and change (If any yes|no)

```
#  PasswordAuthentication ...
```
to

```
PasswordAuthentication yes
```
4. Restart sshd(8)

```
/etc/rc.d/sshd restart
```


----------



## anorian (Jul 28, 2012)

zhoopin said:
			
		

> root is not allowed to login using winscp(scp)/ssh by Default.
> 
> Solution 2 (Prefered - Secure):
> 1. transfer the file as a normal user, then
> ...



of course I make PermitRootLogin yes

I make "nat" with vmware and after I cant login ssh root "Access Denied."

but I can connect root ssh login "Bridged"

so I want use "nat"

and I think must open port for nat

I wait for help


----------



## anorian (Jul 28, 2012)

need help


----------



## zhoopin (Jul 28, 2012)

In case of NAT, You should setup Port Forwarding by using *Virtual Network Editor*.

Vmware: Edit > Virtual Network Editor.

Refer to vmware Reference:
_VMware Workstation Help : Using the Virtual Network Editor_


----------



## anorian (Jul 28, 2012)

zhoopin said:
			
		

> In case of NAT, You should setup Port Forwarding by using *Virtual Network Editor*.
> 
> Vmware: Edit > Virtual Network Editor.
> 
> ...



my /var/log/auth.log

Jul 28 17:01:20 FreeBSD login: ROOT LOGIN (root) ON ttyv0
Jul 28 19:26:49 FreeBSD sshd[1076]: Server listening on :: port 22.
Jul 28 19:26:49 FreeBSD sshd[1076]: Server listening on 0.0.0.0 port 22.
Jul 28 19:54:28 FreeBSD sshd[1132]: Server listening on :: port 22.
Jul 28 19:54:28 FreeBSD sshd[1132]: Server listening on 0.0.0.0 port 22.

Where else should I look


----------



## gkontos (Jul 28, 2012)

anorian said:
			
		

> Where else should I look



You could try the VMware forums. Clearly, your problem is irrelevant to FreeBSD.


----------

