Sponsored Content
Top Forums Shell Programming and Scripting Connect to Windows from Linux using NetCat Post 302732551 by Jotne on Sunday 18th of November 2012 11:33:27 AM
Old 11-18-2012
Connect to Windows from Linux using NetCat

Hi

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
Code:
(sleep 2 ; echo user ; sleep 1; echo pass; sleep 2; echo netstat) | nc -t 10.10.10.34 23

gives this output
Code:
ÿý%ÿûÿûÿý'ÿýÿýÿûWelcome to Microsoft Telnet Service

login: user44passnetstatroot@magnus

Also tried echo "user/n"
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How do I connect windows xp to Linux Red hat unix

I just bought a new pc and my unix software is installed on my old computer. I want to take the hard disk outta my old pc and then install it on my new pc so my new pc has 2 hard drives. now, after my pc new has 2 hard drives, one being unix the other being windows xp, i want to be able to... (7 Replies)
Discussion started by: TRUEST
7 Replies

2. Windows & DOS: Issues & Discussions

How to connect SFTP(Linux) from Windows DOS

I need to write a batch script for file transfer from SFTP to Windows system. SFTP is on Linux system. I kept this code in batch file and executing it.. but not working.. Even i tried from Command prompt like this "open sftp.host.com" but getting error. Can anyone help with the code and tell me how... (15 Replies)
Discussion started by: mohantmk
15 Replies

3. Shell Programming and Scripting

Connect windows server

Hi All, I need to connect windows server by unix shell script then search the directory for some keyword in all files in that directory... Windows Server is \\wh01ad04 Please help me and thanks in advance (2 Replies)
Discussion started by: Pratik4891
2 Replies

4. Shell Programming and Scripting

Connect to Oracle in Windows XP from Linux HOST

Hi everyone, I have oracle 9i installed in Windows XP and i have ubuntu in VM WARE. I would like to know how to connect to Oracle in windows xp from Linux through shel scripting...... (3 Replies)
Discussion started by: Zimbu
3 Replies

5. Linux

Help!! trying to connect to linux SSH from windows putty client

Hi, i am trying to connect my Putty session on a windows box to a linux SSH, i have generated private and public key pairs using puttygen, i have set the public one to be in an OPENSSH format... and have put this in my authorized_keys file in linux, when i connect i get the following errors: ... (1 Reply)
Discussion started by: Jtyreman
1 Replies

6. Ubuntu

Steps to connect linux (Ubuntu) machine from windows 7

Hi, Can anyone give me the steps to connect ubuntu from windows7? Thanks (1 Reply)
Discussion started by: diehard
1 Replies

7. Windows & DOS: Issues & Discussions

Connect to Windows server from Linux

Hi, We are running Linux server and are required to connect to Windows server and fetch the files from windows server. How can i connect to Windows server from Linux? I have to do this with a automated shell script on Linux I appreciate your response. (4 Replies)
Discussion started by: reachmexyz
4 Replies

8. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

9. Cybersecurity

When i start CSF i cant connect VPS or download any data into it It appears i cant connect Linux VP?

It appears i cant connect linux VPS server via SSH or i cant SCP any file to it and i cant wget any file TO it (from inside it) while CSF (Config Server Firewall, LFD is running. Just after isntall in default configuration and after changing TESTING mode to LIVE mode. Trying to wget & install... (1 Reply)
Discussion started by: postcd
1 Replies

10. Linux

How to connect Linux server (configure two way authentication) with Windows server?

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (0 Replies)
Discussion started by: manjusharma128
0 Replies
sleep(1)						      General Commands Manual							  sleep(1)

NAME
sleep - Suspends execution for at least the specified time SYNOPSIS
sleep seconds STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: sleep: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
None OPERANDS
Non-negative integer specifying the number of seconds for which execution is to be suspended. DESCRIPTION
The sleep command suspends execution of a process for at least the interval specified by seconds, which can range from 0 to 2,147,483,647 seconds. Depending on system activity, the actual time of suspension may be longer. See the sleep(3) reference page. [Tru64 UNIX] seconds can be entered as a non-negative decimal, octal, or hexadecimal value. NOTES
If sleep receives a SIGALARM signal before process execution has resumed, sleep takes one of the following actions: Terminates normally with a 0 (zero) exit status. (See the sleep(3) reference page for more information.) Ignores the signal Performs default processing EXIT STATUS
The following exit values are returned: Execution was successfully suspended for at least the requested time, or a SIGALARM signal was received. An error occurred. EXAMPLES
To display a message at 4-minute intervals for 20 minutes, create a shell script called remind containing the following: for i do sleep 240; echo $i sleep 240; echo $i sleep 240; echo $i sleep 240; echo $i sleep 240; echo $i done To display the message Try calling NHK at 4-minute intervals, enter: remind 'Try calling NHK' To run a command at regular intervals, create a shell script containing the following: while true do date sleep 60 done This displays the date and time once a minute. To execute a command after a specified interval, enter the following; (sleep 3600; echo Time's up) & This displays the message "Time's up" after one hour. ENVIRONMENT VARIABLES
The following environment variables affect the execution of sleep: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: wait(1) Functions: alarm(3), pause(3), sigaction(2), sleep(3) Standards: standards(5) sleep(1)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy