mirror of
https://github.com/kennethreitz-archive/sshout.git
synced 2026-06-05 07:26:14 +00:00
sshit => sshout
This commit is contained in:
@@ -26,14 +26,14 @@ if sys.version_info[0:2] < (2, 6):
|
||||
required.append('simplejson')
|
||||
|
||||
setup(
|
||||
name='sshit',
|
||||
name='sshout',
|
||||
version='0.0.0',
|
||||
description='SSH it up.',
|
||||
long_description=open('README.rst').read(),
|
||||
author='Kenneth Reitz',
|
||||
author_email='me@kennethreitz.com',
|
||||
url='https://github.com/kennethreitz/sshit',
|
||||
packages= ['sshit'],
|
||||
url='https://github.com/kennethreitz/sshout',
|
||||
packages= ['sshout'],
|
||||
install_requires=required,
|
||||
license='ISC',
|
||||
classifiers=(
|
||||
@@ -50,7 +50,8 @@ setup(
|
||||
),
|
||||
entry_points = {
|
||||
'console_scripts': [
|
||||
'sshit = sshit.cli:main'
|
||||
'sshout = sshout.cli:main',
|
||||
'tmpsshd = sshout.tmpsshd:main',
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
@@ -10,6 +10,7 @@ from twisted.conch.ssh import factory, userauth, connection, keys, session
|
||||
from twisted.internet import reactor, protocol, defer
|
||||
from twisted.python import log
|
||||
from zope.interface import implements
|
||||
from twisted.conch.unix import UnixSSHRealm
|
||||
import sys
|
||||
log.startLogging(sys.stderr)
|
||||
|
||||
@@ -106,14 +107,17 @@ class ExampleFactory(factory.SSHFactory):
|
||||
|
||||
|
||||
# portal = portal.Portal(ExampleRealm())
|
||||
from twisted.conch.unix import UnixSSHRealm
|
||||
portal = portal.Portal(UnixSSHRealm())
|
||||
passwdDB = checkers.InMemoryUsernamePasswordDatabaseDontUse()
|
||||
passwdDB.addUser('kreitz', 'password')
|
||||
portal.registerChecker(passwdDB)
|
||||
portal.registerChecker(InMemoryPublicKeyChecker())
|
||||
ExampleFactory.portal = portal
|
||||
def bootstrap(username):
|
||||
from twisted.cred import portal
|
||||
|
||||
portal = portal.Portal(UnixSSHRealm())
|
||||
passwdDB = checkers.InMemoryUsernamePasswordDatabaseDontUse()
|
||||
passwdDB.addUser(username, 'password')
|
||||
portal.registerChecker(passwdDB)
|
||||
portal.registerChecker(InMemoryPublicKeyChecker())
|
||||
ExampleFactory.portal = portal
|
||||
|
||||
if __name__ == '__main__':
|
||||
bootstrap('kreitz')
|
||||
reactor.listenTCP(5022, ExampleFactory())
|
||||
reactor.run()
|
||||
Reference in New Issue
Block a user