在git clone报错

在阿里云新买了一台服务器,用的原正常运行的系统作的镜像文件,但在拉代码的时候提示以下报错:
[root@ap001 ]# git clone git@192.168.1.24:java/psd.git
Cloning into 'psd'...
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.java

Please make sure you have the correct access rights
and the repository exists.git

处理方案:
想起本身在gitlab服务器有设置了IP访问。开启了/etc/hosts.all。把新IP添加到hosts文件里便可,服务器