로컬 Windows XP 시스템의 ANT 스크립트를 사용하여 UNIX 서버의/x/y/z 위치에서 .sql 파일을 실행하려고합니다. .sql 파일은 UNIX 서버에 있습니다. 나는 아래의 포스트 키 파일 오류 시도ANT를 사용하여 원격 서버에서 SQL 파일을 실행하는 방법
<target name="execute" >
<sshexec host="hostname"
username="UNIX system username"
keyfile="/export/home/appldev/.ssh/id_dsa"
commandResource="psql -f /u01/appldev/devappl/po/11.5.0/reports/xxbt/1.0.0/sql"/>
</target>
:
Buildfile: C:\Program Files\Java\apache-ant-1.8.1\build.xml
execute:
[sshexec] Connecting to server_IP:22
BUILD FAILED
C:\Program Files\Java\apache-ant-1.8.1\build.xml:49: com.jcraft.jsch.JSchExcepti
on: connection is closed by foreign host
:
<target name="execute" >
<sshexec host="server_ip"
username="server_uname"
password="server_pass"
command="touch abc"/>
</target>
을 오류를 얻었다
내 Windows XP 시스템에서 개미 목표 아래를 사용했다
도와주세요.
키 파일은 클라이언트 측에 있습니다 (Windows XP). 개인 키를 사용하여 암호 대신 클라이언트를 인증합니다. 자세한 내용은 Google "SSH 공개 키 인증"을 참조하십시오. – leedm777
UNIX 서버에서 sshd가 실행 중입니까? SSH를 차단하는 방화벽 설정이 있습니까? – leedm777