WinSCP的连接到Amazon EC2 AMI实例登录后更改用户QUOT&;根" [英] WinSCP connect to Amazon AMI EC2 Instance changing user after login to "root"

查看:1503
本文介绍了WinSCP的连接到Amazon EC2 AMI实例登录后更改用户QUOT&;根"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

注意:这适用于腻子

解决方案
  

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

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

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

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

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

 根ALL = NOPASSWD:ALL
 

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

I followed instructions here carefully however I haven't get this working right. Here is what I did:

  1. Run WinSCP enter Hostname (Elastic IP of my Instance)
  2. enter username "ec2-user"
  3. enter public key file
  4. chose SCP for the protocol
  5. Under SCP/Shell settings I chose "sudo su -"
  6. Hit Login
  7. WinSCP asks me for passphrase key, Hit OK
  8. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆