🆕 新增默认指令
This commit is contained in:
parent
e0b12a98e8
commit
c3a689cc96
@ -13,5 +13,10 @@
|
|||||||
"name": "查询本机公网IP",
|
"name": "查询本机公网IP",
|
||||||
"command": "curl ifconfig.me",
|
"command": "curl ifconfig.me",
|
||||||
"description": "查询本机公网IP"
|
"description": "查询本机公网IP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "生成ssh密钥对",
|
||||||
|
"command": "ssh-keygen -t rsa -b 2048",
|
||||||
|
"description": "生成ssh密钥对"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -17,16 +17,6 @@ function createInteractiveShell(socket, sshClient) {
|
|||||||
sshClient.end()
|
sshClient.end()
|
||||||
})
|
})
|
||||||
socket.emit('connect_shell_success') // 已连接终端,web端可以执行指令了
|
socket.emit('connect_shell_success') // 已连接终端,web端可以执行指令了
|
||||||
// web端输入
|
|
||||||
// socket.on('input', key => {
|
|
||||||
// if (sshClient._sock.writable === false) return consola.info('终端连接已关闭,禁止输入')
|
|
||||||
// stream.write(key)
|
|
||||||
// })
|
|
||||||
// 监听按键重置终端大小
|
|
||||||
// socket.on('resize', ({ rows, cols }) => {
|
|
||||||
// // consola.info('更改tty终端行&列: ', { rows, cols })
|
|
||||||
// stream.setWindow(rows, cols)
|
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user