Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Connect to Windows from Linux using NetCat

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 11-18-2012   -   Original Discussion by Jotne
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 213 Times in 203 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   -   Original Discussion by Jotne
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
Join Date: Aug 2005
Last Activity: 17 November 2017, 9:25 PM EST
Location: Saskatchewan
Posts: 22,512
Thanks: 1,151
Thanked 4,273 Times in 3,946 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

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 02:24 AM
Help!! trying to connect to linux SSH from windows putty client Jtyreman Linux 1 05-01-2012 06:03 AM
Connect to Oracle in Windows XP from Linux HOST Zimbu Shell Programming and Scripting 3 03-23-2011 02:11 AM
How to connect SFTP(Linux) from Windows DOS mohantmk Windows & DOS: Issues & Discussions 15 04-06-2009 04:02 PM
How do I connect windows xp to Linux Red hat unix TRUEST UNIX for Advanced & Expert Users 7 11-21-2002 12:02 PM

All times are GMT -4. The time now is 03:34 PM.