WinSCP的连接到Amazon EC2 AMI实例登录后更改用户QUOT&;根" [英] WinSCP connect to Amazon AMI EC2 Instance changing user after login to "root"
问题描述
我也跟着指示这里仔细,但是我还没有得到这个工作的权利。这是我做的:
- 运行输入的WinSCP主机名(我的实例的弹性IP)
- 输入用户名EC2用户
- 输入公钥文件
- 选择SCP的协议
- 在SCP / Shell设置我选择了须藤苏 -
- 点击登录
- 在WinSCP的问我要密码键,点击确定
- 显示了这个错误
错误跳过启动消息。您的 外壳可能是不兼容 应用程序(BASH建议)。
注意:这适用于腻子
的WinSCP不支持需要仿真终端或用户输入的命令。
请参阅: http://winscp.net/eng/docs/remote_command#limitations
由于 sudo的苏 -
需要一个密码,这是行不通的。
有变通的办法:让根
登录而不会被提示输入密码。
的/ etc / sudoers文件
并添加做到这一点
根ALL = NOPASSWD:ALL
不用说,这是不是一个很好的事情 - 其原因应该是显而易见的:)
I followed instructions here carefully however I haven't get this working right. Here is what I did:
- Run WinSCP enter Hostname (Elastic IP of my Instance)
- enter username "ec2-user"
- enter public key file
- chose SCP for the protocol
- Under SCP/Shell settings I chose "sudo su -"
- Hit Login
- WinSCP asks me for passphrase key, Hit OK
- Shows up this error
Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
NOTE: This works on Putty
WinSCP does not support commands that require terminal emulation or user input.
See: http://winscp.net/eng/docs/remote_command#limitations
Since sudo su -
expects a password, it wouldn't work.
There is a way around it: make root
logon without being prompted for a password. You can do this by editing your sudoers file usually located at /etc/sudoers
and adding:
root ALL=NOPASSWD: ALL
Needless to say, this is Not a Very Good Thing To Do - for reasons which should be obvious :)
这篇关于WinSCP的连接到Amazon EC2 AMI实例登录后更改用户QUOT&;根"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!