Sponsored Content
Top Forums Shell Programming and Scripting Connect to Windows from Linux using NetCat Post 302732559 by Corona688 on Sunday 18th of November 2012 12:46:33 PM
Old 11-18-2012
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...
 

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
SQLSRV_CONNECT(3)														 SQLSRV_CONNECT(3)

sqlsrv_connect - Opens a connection to a Microsoft SQL Server database

SYNOPSIS
resource sqlsrv_connect (string $serverName, [array $connectionInfo]) DESCRIPTION
Opens a connection to a Microsoft SQL Server database. By default, the connection is attempted using Windows Authentication. To connect using SQL Server Authentication, include "UID" and "PWD" in the connection options array. PARAMETERS
o $serverName - The name of the server to which a connection is established. To connect to a specific instance, follow the server name with a forward slash and the instance name (e.g. serverNamesqlexpress). o $connectionInfo - An associative array that specifies options for connecting to the server. If values for the UID and PWD keys are not specified, the connection will be attempted using Windows Authentication. For a complete list of supported keys, see SQLSRV Connection Options. RETURN VALUES
A connection resource. If a connection cannot be successfully opened, FALSE is returned. EXAMPLES
Example #1 Connect using Windows Authentication. <?php $serverName = "serverNamesqlexpress"; //serverNameinstanceName // Since UID and PWD are not specified in the $connectionInfo array, // The connection will be attempted using Windows Authentication. $connectionInfo = array( "Database"=>"dbName"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.<br />"; }else{ echo "Connection could not be established.<br />"; die( print_r( sqlsrv_errors(), true)); } ?> Example #2 Connect by specifying a user name and password. <?php $serverName = "serverNamesqlexpress"; //serverNameinstanceName $connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.<br />"; }else{ echo "Connection could not be established.<br />"; die( print_r( sqlsrv_errors(), true)); } ?> Example #3 Connect on a specifed port. <?php $serverName = "serverNamesqlexpress, 1542"; //serverNameinstanceName, portNumber (default is 1433) $connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.<br />"; }else{ echo "Connection could not be established.<br />"; die( print_r( sqlsrv_errors(), true)); } ?> NOTES
By default, the sqlsrv_connect(3) uses connection pooling to improve connection performance. To turn off connection pooling (i.e. force a new connection on each call), set the "ConnectionPooling" option in the $connectionOptions array to 0 (or FALSE). For more information, see SQLSRV Connection Pooling. The SQLSRV extension does not have a dedicated function for changing which database is connected to. The target database is specified in the $connectionOptions array that is passed to sqlsrv_connect. To change the database on an open connection, execute the following query "USE dbName" (e.g. sqlsrv_query($conn, "USE dbName")). SEE ALSO
sqlsrv_close(3), sqlsrv_errors(3), sqlsrv_query(3). PHP Documentation Group SQLSRV_CONNECT(3)
All times are GMT -4. The time now is 07:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy