在Linux系统中使用ssh命令可以连接服务器,如果出现command not found,是因为没有安装ssh,安装openssh-clients后就可以使用ssh命令来连接服务器了。
[[email protected] zdw]# ssh ip bash: ssh: command not found [[email protected] zdw]# yum -y install openssh-clients #安装openssh-clients [[email protected] zdw]# ssh -p56789 [email protected] #56789为ssh的端口 [email protected]‘s password: Last login: Fri May 6 17:51:08 2016 from 106.37.240.19 [[email protected] ~]# cat ~/.ssh/known_hosts #密钥文件所存的位置 [[email protected] zdw]# scp -P52113 /home/zdw/996.sh [email protected]:/tmp #scp命令复制文件 [email protected]‘s password: 996.sh 100% 0 0.0KB/s 00:00
时间: 2024-08-26 04:16:43