Can I do it using python?? about xterm and telnet

placid Bulkan at gmail.com
Sun Jul 2 08:38:39 EDT 2006


Jim Segrave wrote:
> In article <1151814697.201988.17140 at b68g2000cwa.googlegroups.com>,
> valpa <valpassing at gmail.com> wrote:
> >I'm a net admin for about 20 unix servers, and I need to frequently
> >telnet on to them and configure them.
> >It is a tiring job to open a xterm and telnet, username, password to
> >each server.
>
> Don't use telnet. it's clumsy and has security issues.

if youre behind a firewall then it shouldnt matter.

>
> Use ssh with RSA or DSA keys. Then you simply do:
>
> ssh username at machine_name
>
> in an xterm and you are loggedis as user username on server
> machinename. It's vastly more secure and more reliable.
>
> If you're talking about initial setup of a machine (OS installation or
> whatever), our solution was to have a post-install CD or floppy which
> fetched standard server configuration data. This included an ssh
> public key for our ssh-key distribution, so after running the
> post-install disc, we could push out staff ssh-keys and logins were
> available.

I dont think the OP wants to do post-install configuration (i may be
wrong! )  but to change for example some config file.

You should be able to create a dictionary containing username=password,
then iterate over this dictionary and use os.system("xterm -e telnet -u
%s -p %s") where -u is username and -p is password (im not quite sure
if telnet has these arguments or if it works like this too)

Cheers




More information about the Python-list mailing list