Editing
SSH login
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Manual=== Virtuozzo(tm) have one very intresting feature: you can log into namebased site by SSH with only one SSH instance, runned on host. So you have not need to have several ports for SSH access. For VServer I have found tool, created by Alec Thomas (you can find it here: http://swapoff.org/LinuxVServer.html) that allow to do that (or close to that) on linux-vserver. I have made small change in vslogin: it get gecos field of user, that named in environment variable LOGNAME, not via userid, so all vserver users are now have one uid - 9999 on vserver host. There also created passwd and shadow sync daemon in perl, that update host /etc/passwd and /etc/shadow with contents of vservers' passwd and shadow. But, better to use nss_vserver module, get info on it at [[Howto_HostAuth]] So, to get one auth point for all users - host ssh (in general - anything, that can auth, can be authorized via PAM on host), you need to: # install SGI::FAM and Proc::Daemon from CPAN. # copy syncshadows daemon to /usr/local/sbin # copy syncshadows init.d script ot /etc/init.d/ (or /etc/rc.d/init.d) # create links to it from rcX.d directiories (/etc/rcX.d or /etc/rc.d/rcX.d/) # Run <tt>/etc/init.d/syncshadows start</tt> # run "make" at vslogin directory and copy vslogin binary to /sbin/ # <tt>chmod u+s /sbin/vslogin</tt> ## <tt>chmod o-rwx /sbin/vslogin; chgrp vslogin /sbin/vslogin</tt> to allow /sbin/vslogin execution only by users in group vserver. needs vslogin group, but you'll have it "automatically" if nss_vserver is configured! # <tt>echo /sbin/vslogin >> /etc/shells</tt> That's all! Now you can log into your vserver by run ssh vserver-user@host ;Note: on host created stubs in form user@vserver and vserver-user for allowing to use domain form where available, and just dash form where not available.
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information