15 lines
498 B
JavaScript
15 lines
498 B
JavaScript
const { execSync } = require('child_process');
|
|
|
|
try {
|
|
console.log('=== Testing SSH without host key checking ===');
|
|
const result = execSync('ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -T git@git.torchcloud.cn', {
|
|
stdio: ['inherit', 'inherit', 'inherit'],
|
|
timeout: 30000,
|
|
cwd: __dirname
|
|
});
|
|
console.log('=== SSH connection successful ===');
|
|
} catch (error) {
|
|
console.error('=== SSH connection failed ===');
|
|
console.error('Exit code:', error.status);
|
|
}
|