Unix/Linux Go Back    

Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Connect to Windows from Linux using NetCat

Shell Programming and Scripting

Closed Linux or Unix Question    
Thread Tools Search this Thread Display Modes
Old Unix and Linux 11-18-2012
Jotne's Unix or Linux Image
Jotne Jotne is offline
Registered User
Join Date: Dec 2010
Last Activity: 20 September 2014, 2:08 AM EDT
Posts: 1,040
Thanks: 62
Thanked 216 Times in 204 Posts
Connect to Windows from Linux using NetCat


Need help to connect from Ubuntu to Windows using NetCat nc
I can not get my script to send new-line

Her is what I have tried
(sleep 2 ; echo user ; sleep 1; echo pass; sleep 2; echo netstat) | nc -t 23

gives this output
%'Welcome to Microsoft Telnet Service

login: user44passnetstatroot@magnus

Also tried echo "user/n"
Sponsored Links
Old Unix and Linux 11-18-2012
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
Join Date: Aug 2005
Last Activity: 5 October 2015, 8:22 PM EDT
Location: Saskatchewan
Posts: 21,066
Thanks: 928
Thanked 3,775 Times in 3,524 Posts
This is the sort of thing you'd use expect for. Especially autoexpect which can read an interactive session and turn it into a script...
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Steps to connect linux (Ubuntu) machine from windows 7 diehard Ubuntu 1 05-08-2012 01:24 AM
Help!! trying to connect to linux SSH from windows putty client Jtyreman Linux 1 05-01-2012 05:03 AM
Connect to Oracle in Windows XP from Linux HOST Zimbu Shell Programming and Scripting 3 03-23-2011 01:11 AM
How to connect SFTP(Linux) from Windows DOS mohantmk Windows & DOS: Issues & Discussions 15 04-06-2009 03:02 PM
How do I connect windows xp to Linux Red hat unix TRUEST UNIX for Advanced & Expert Users 7 11-21-2002 11:02 AM

All times are GMT -4. The time now is 08:13 AM.