OpenVZ Forum


Home » General » Support » Access ssh
Access ssh [message #2582] Mon, 10 April 2006 18:10 Go to next message
lkhost.com is currently offline  lkhost.com
Messages: 6
Registered: April 2006
Junior Member
Hello

After create, i not obtain access per ssh w/ root password.

vzctl start 101
vzctl exec 101 service sshd start
vzctl set 101 --userpasswd root:t3mp

In ssh:
login as: root
Password:
Access denied

ssh running.
why?

Thanks

[Updated on: Mon, 10 April 2006 18:12]

Report message to a moderator

Re: Access ssh [message #2584 is a reply to message #2582] Mon, 10 April 2006 19:22 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

1. are you able to 'enter' VPS?
2. what host OS, OVZ kernel and template do you use?

try:
# vzctl exec 101 mount devpts /dev/pts -t devpts
# vzctl exec 101 MAKEDEV tty
# vzctl exec 101 MAKEDEV pty


http://static.openvz.org/userbars/openvz-developer.png
Re: Access ssh [message #2585 is a reply to message #2584] Mon, 10 April 2006 20:29 Go to previous messageGo to next message
lkhost.com is currently offline  lkhost.com
Messages: 6
Registered: April 2006
Junior Member
Hello, thanks Razz

Well, OS centos 4.2. Template centos-4-i386-minimal.

In grub:
title OpenVZ (2.6.8-022stab061.1-smp)
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-022stab061.1-smp ro root=LABEL=/
initrd /boot/initrd-2.6.8-022stab061.1-smp.img

root@starznetwork [~]# vzctl exec 101 mount devpts /dev/pts -t devpts
Unable to open /dev/vzctl: No such device or address
Please check that vzdev kernel module is loaded and you have sufficient permissions to access the file.

root@starznetwork [~]# vzctl exec 101 MAKEDEV tty
Unable to open /dev/vzctl: No such device or address
Please check that vzdev kernel module is loaded and you have sufficient permissions to access the file.
root@starznetwork [~]# vzctl exec 101 MAKEDEV pty
Unable to open /dev/vzctl: No such device or address
Please check that vzdev kernel module is loaded and you have sufficient permissions to access the file.

Help Smile



Re: Access ssh [message #2604 is a reply to message #2585] Tue, 11 April 2006 10:06 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

you somehow lost /dev/vzctl file in host system. Did you install manually from sources or from RPM?

In any case, type:
# mknod /dev/vzctl c 126 0


http://static.openvz.org/userbars/openvz-developer.png
Re: Access ssh [message #2610 is a reply to message #2604] Tue, 11 April 2006 13:53 Go to previous messageGo to next message
lkhost.com is currently offline  lkhost.com
Messages: 6
Registered: April 2006
Junior Member
Hello, thanks again.

All rpm.
I copied of page: http://www.eth0.us/taxonomy/term/23
root@server17 [~]# /dev/vzctl
-bash: /dev/vzctl: Permission denied
root@server17 [~]# mknod /dev/vzctl c 126 0
mknod: `/dev/vzctl': File exists
some idea?

Help again....
Re: Access ssh [message #2611 is a reply to message #2610] Tue, 11 April 2006 13:59 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

1.
# ls -la /dev/vzctl

2. disable selinux on your node. see /etc/selinux/conf file.

3.
# strace -o -f out.file vzctl exec 101 ls
and post out.file here.


http://static.openvz.org/userbars/openvz-developer.png
Re: Access ssh [message #2618 is a reply to message #2611] Tue, 11 April 2006 17:59 Go to previous messageGo to next message
lkhost.com is currently offline  lkhost.com
Messages: 6
Registered: April 2006
Junior Member
Hello,

Selinux disable now.

root@server17 [~]# ls -la /dev/vzctl
crw------- 1 root root 126, 0 Apr 11 12:53 /dev/vzctl
root@server7 [~]# strace -o -f out.file vzctl exec 101 ls
strace: out.file: command not found
root@server17 [~]#

thanks Sad
Re: Access ssh [message #2619 is a reply to message #2618] Tue, 11 April 2006 18:39 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

(1) Initial "access denied" error was probably caused by the "PermitRootLogin no" setting in /etc/ssh/sshd_config. Edit the file, set "PermitRootLogin yes" and restart sshd.

(2) /dev/vzctl problem might be caused by the fact you haven't started openvz on the node after the reboot. Does running "/etc/init.d/vz start" helps?


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Access ssh [message #2620 is a reply to message #2619] Tue, 11 April 2006 19:18 Go to previous messageGo to next message
lkhost.com is currently offline  lkhost.com
Messages: 6
Registered: April 2006
Junior Member
Hello

"PermitRootLogin yes" and restart sshd , it okay.

(2) /dev/vzctl problem might be caused by the fact you haven't started openvz on the node after the reboot. Does running "/etc/init.d/vz start" helps?

vz started in reboot.

root@server17 [~]# /etc/init.d/vz start
OpenVZ already running [FAILED]


root@server7 [~]# /etc/init.d/vz stop
Shutting down VPS 101
Stopping OpenVZ: [ OK ]
root@server7 [~]# /etc/init.d/vz restart
Stopping OpenVZ: [ OK ]
Starting OpenVZ: [ OK ]
Bringing up interface venet0: [ OK ]
Configuring interface venet0: [ OK ]
Starting VPS 101: [ OK ]

and now? Shocked
Re: Access ssh [message #2634 is a reply to message #2620] Wed, 12 April 2006 15:27 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Leonardo,

the problem is very simple, you use the same IP for both VPS and your host system.

If you want your VPS to use the same IP, you need at least setup NAT in host system. See this topic on forum for this:
http://forum.openvz.org/index.php?t=tree&goto=2254&# msg_2254
But since I see your host has multiple IPs, I don't think this is what you want...

So what you need is to leave one IP to host, remove other IPs from host configuration and assign them to your VPSs.


http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Iptables problem in SUSE10 kernel
Next Topic: Using the same IP as VPS0 (HOST)
Goto Forum:
  


Current Time: Mon Aug 05 18:33:48 GMT 2024

Total time taken to generate the page: 0.04233 seconds