【发布时间】:2013-05-22 18:18:40
【问题描述】:
我收到以下错误,我认为这是由于我的用户名有空格造成的 - 在本例中,我的名字是“用户名 Mark”
WARNING: Could not generate compute ssh key:
Public key file (/Users/username Mark/.ssh/google_compute_engine.pub) doesn't contain an OpenSSH public key. The key must consist of exactly three space separated parts.
ssh-rsa AAAAB3NzaC1yc2EAAAADAL3LiXbkjcIlHo9j5L5Sw/Tr0W+mYQBq0/cCCdD1FiiRHtPN9vt8ZJ+TxtnRzOvn040BQnLWwGzxWt2LaAHWISHQJqF6Cd7AHuN9eypzoF85vxKMKL3LgabR+Mcdj3LKoH4jOF/xx6PvfA74SDnl/8N username Mark@Marks-MBook-Air.local
我尝试将 google_compute_engine.pub 文件编辑为“用户名 Mark”@Marks-MBook-Air.local 但同样的错误。
然后我通过将用户名和主机添加到 ssh 配置文件来尝试解决方案,如此答案中突出显示的:scp on OSX doesn't allow spaces in usernames?
我用过:
Host NBMark
User "username Mark"
Hostname Marks-MBook-Air.local
这让我更进一步,但随后产生了这个错误,表明它没有锻炼(IP 号码已更改):
Marks-MBook-Air:~ username Mark$ gcutil --service_version="v1beta14" --project="project-name" ssh --zone="europe-west1-a" "instance-test-2"
INFO: Updated project with new ssh key. It can take several minutes for the instance to pick up the key.
INFO: Waiting 300 seconds before attempting to connect.
INFO: Running command line: ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no -i /Users/username Mark/.ssh/google_compute_engine -A -p 22 username Mark@5.35.208.77 --
Warning: Permanently added '5.35.208.77' (RSA) to the list of known hosts.
Permission denied (publickey).
是否可以逃脱认证空间?
edit - 我最终设法通过使用本指南重命名我的短名称登录: http://www.macworld.com/article/1132693/changeshortusername.html
您忠实的, 标记
【问题讨论】:
-
很高兴你能成功!请将您的答案作为答案发布,以便每个人都可以轻松看到:meta.stackexchange.com/questions/132886/…