WinSCP的连接到Amazon EC2 AMI实例登录后更改用户QUOT&;根"连接到、实例、用户、Amazon

2023-09-11 08:53:21 作者:倾安

我也跟着指示这里仔细,但是我还没有得到这个工作的权利。这是我做的:

运行输入的WinSCP主机名(我的实例的弹性IP) 输入用户名EC2用户 输入公钥文件 选择SCP的协议 在SCP / Shell设置我选择了须藤苏 - 点击登录 在WinSCP的问我要密码键,点击确定 显示了这个错误   

错误跳过启动消息。您的   外壳可能是不兼容   应用程序(BASH建议)。

注意:这适用于腻子

解决方案   

的WinSCP不支持需要仿真终端或用户输入的命令。

请参阅: http://winscp.net/eng/docs/remote_command#limitations

由于 sudo的苏 - 需要一个密码,这是行不通的。

有变通的办法:让登录而不会被提示输入密码。

:您可以通过编辑sudoers文件通常位于的/ etc / sudoers文件并添加做到这一点

 根ALL = NOPASSWD:ALL
 
体验 从零开始使用AWS云存储网关

不用说,这是不是一个很好的事情 - 其原因应该是显而易见的:)

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 :)

 
精彩推荐