UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 18th, 2003, 05:44 AM
w33man w33man is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Bonnie scotland
Posts: 2 w33man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to w33man
Telnet connection automatic

Hi I'm a newbie to unix and i have been given a project to work on, this project involves running a script that opens a telnet session and checks for user id and password. But when the script is run the following error occurs

Telnet> hostname <<!!
> username
> xyz
> !!

Trying 150.10.1.221...
Connected to edcsun1.
Escape character is '^]'.
Connection closed by foreign host.

The username and password are legitimate:
and if wrong. It should prompt for user to enter correct details

Reply With Quote
  #2  
Old September 18th, 2003, 04:27 PM
Prime Mover Prime Mover is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Jersey
Posts: 64 Prime Mover User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
Have you tried telnetting to the machine manually without the script? If you don't get in manually, you'll never get in via script.

If you have been able to do it manually, then there really should be no reason it doesn't work through scripting.

-Gary
__________________
Trying to change its program
Trying to change the mode...crack the code
Images conflicting into data overload

Reply With Quote
  #3  
Old September 19th, 2003, 10:15 AM
w33man w33man is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Bonnie scotland
Posts: 2 w33man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to w33man
telnet ftp connection

yeah works manually but wont allow the script, have tried using ftp with the .netrc file but still relatively new to this game (i.e. 2 weeks) so finding my feet anyway since then

Trying to ftp a printer to collect info but the ftp file shows that when it gets to password the mode is incorrect

both the login and the password are not compulsory (e.g. if the user hits the enter button twice the ftp session is initiated)

any ideas

Taking out the password line in the .netrc allows me to get to the password but this has to be entered manually i.e hit the enter button, to continue but I need this to be automatic

Reply With Quote
  #4  
Old September 19th, 2003, 04:55 PM
Prime Mover Prime Mover is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Jersey
Posts: 64 Prime Mover User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
If the user/password are not necessary, and a blank carriage return suffices for both fields, can you send it an EOF for both lines?

-Gary

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Telnet connection automatic

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap