I have a Batch file to use ssh connection. So When I run the batch file
manually its works fine, but when I schedule it on job managment from SQL
2000 it doesnt work.
Help me pleaseProbably service account and permissions problems. Verify that Agent has the
needed permissions.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"jdonaldo" <jdonaldo@.discussions.microsoft.com> wrote in message
news:0DF4CDB5-4C6A-49AA-A798-4B56DFCDA65D@.microsoft.com...
>I have a Batch file to use ssh connection. So When I run the batch file
> manually its works fine, but when I schedule it on job managment from SQL
> 2000 it doesnt work.
> Help me please|||ok thanks for yor answer but the user has permission to run the service, In
fact the user can run other batch files.
I debug the batch and this is the result:
Executing: program /usr/bin/ssh host 10.10.10.1, user dispo, command scp -v
-t WEBDSP.TXT
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.10.10.1 [10.10.10.1] port 22.
debug1: Connection established.
debug1: identity file id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.7.1p
2
debug1: match: OpenSSH_3.7.1p2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
-- last line --
This results is when I run from SQL Server, but if a run it from command
console the result is this
Executing: program /usr/bin/ssh host 10.10.10.1, user dispo, command
-t WEBDSP.TXT
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 10.10.10.1 [10.10.10.1] port 22.
debug1: Connection established.
debug1: identity file id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.
debug1: match: OpenSSH_3.7.1p2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '10.10.10.1' is known and matches the RSA host key.
debug1: Found key in /home/ottod/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-i
ve
debug1: Next authentication method: publickey
debug1: Offering public key: id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t WEBDSP.TXT
Sending file modes: C0777 3894 webdsp.txt
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.8 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
What do you think?
"Tibor Karaszi" wrote:
> Probably service account and permissions problems. Verify that Agent has t
he needed permissions.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "jdonaldo" <jdonaldo@.discussions.microsoft.com> wrote in message
> news:0DF4CDB5-4C6A-49AA-A798-4B56DFCDA65D@.microsoft.com...
>|||> ok thanks for yor answer but the user has permission to run the service,
I don't understand what you mean by above. When agent executes something, it
is executed in agents
service user context, not the user who owns the job.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"jdonaldo" <jdonaldo@.discussions.microsoft.com> wrote in message
news:F10E7461-4A0B-49A5-8087-432269318F23@.microsoft.com...[vbcol=seagreen]
> ok thanks for yor answer but the user has permission to run the service, I
n
> fact the user can run other batch files.
> I debug the batch and this is the result:
> Executing: program /usr/bin/ssh host 10.10.10.1, user dispo, command scp -
v
> -t WEBDSP.TXT
> OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
> debug1: Reading configuration data /etc/ssh_config
> debug1: Connecting to 10.10.10.1 [10.10.10.1] port 22.
> debug1: Connection established.
> debug1: identity file id_dsa type 2
> debug1: Remote protocol version 1.99, remote software version OpenSSH_3.7.
1p2
> debug1: match: OpenSSH_3.7.1p2 pat OpenSSH*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: server->client aes128-cbc hmac-md5 none
> debug1: kex: client->server aes128-cbc hmac-md5 none
> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
> debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
> -- last line --
> This results is when I run from SQL Server, but if a run it from command
> console the result is this
> Executing: program /usr/bin/ssh host 10.10.10.1, user dispo, command
> -t WEBDSP.TXT
> OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
> debug1: Reading configuration data /etc/ssh_config
> debug1: Connecting to 10.10.10.1 [10.10.10.1] port 22.
> debug1: Connection established.
> debug1: identity file id_dsa type 2
> debug1: Remote protocol version 1.99, remote software version OpenSSH_3.
> debug1: match: OpenSSH_3.7.1p2 pat OpenSSH*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: server->client aes128-cbc hmac-md5 none
> debug1: kex: client->server aes128-cbc hmac-md5 none
> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
> debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
> debug1: Host '10.10.10.1' is known and matches the RSA host key.
> debug1: Found key in /home/ottod/.ssh/known_hosts:1
> debug1: ssh_rsa_verify: signature correct
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug1: SSH2_MSG_NEWKEYS received
> debug1: SSH2_MSG_SERVICE_REQUEST sent
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug1: Authentications that can continue: publickey,password,keyboard-i
> ve
> debug1: Next authentication method: publickey
> debug1: Offering public key: id_dsa
> debug1: Server accepts key: pkalg ssh-dss blen 433
> debug1: read PEM private key done: type DSA
> debug1: Authentication succeeded (publickey).
> debug1: channel 0: new [client-session]
> debug1: Entering interactive session.
> debug1: Sending command: scp -v -t WEBDSP.TXT
> Sending file modes: C0777 3894 webdsp.txt
> debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
> debug1: channel 0: free: client-session, nchannels 1
> debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.8 seconds
> debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
> debug1: Exit status 0
>
> What do you think?
> "Tibor Karaszi" wrote:
>|||the user can run the agent, because I created others job and run fine
"jdonaldo" wrote:
> I have a Batch file to use ssh connection. So When I run the batch file
> manually its works fine, but when I schedule it on job managment from SQL
> 2000 it doesnt work.
> Help me please
No comments:
Post a Comment