查看“模板:USJ New SSH Users”的源代码
来自Ubuntu中文
←
模板:USJ New SSH Users
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== Adding new SSH users == *On the server, create a second user account (that guest users can use for SSH purposes) with a password dissimilar to any other passwords (such as ''myjauntyguestpassword''): sudo useradd -m ''myjaunty00guest'' sudo passwd ''myjaunty00guest'' sudo mkdir /home/''myjaunty00guest''/.ssh sudo chmod 777 /home/''myjaunty00guest''/.ssh *Allow OpenSSH Password Authentication temporarily. Edit the OpenSSH configuration file: sudo gedit /etc/ssh/sshd_config :and temporarily allow Password-based Authentication by changing the line: PasswordAuthentication no :to PasswordAuthentication yes :then restart the OpenSSH server: sudo /etc/init.d/ssh restart From the new Linux user's client computer: ssh-keygen scp -P ''22199'' ~/.ssh/id_rsa.pub ''myjaunty00guest''@''myjaunty00.dyndns.org'':~/.ssh/id_rsa.pub :When prompted, of course, the guest password, ''myjauntyguestpassword'', should be entered. *Back on the server (logged in as the administrator ''jauntyadmin00''), turn off the OpenSSH Password Authentication again: sudo gedit /etc/ssh/sshd_config Change the line: PasswordAuthentication yes :to PasswordAuthentication no :then restart the OpenSSH server: sudo /etc/init.d/ssh restart It is then usually best (for security reasons) to now change the guest password to something completely different: sudo passwd ''myjaunty00guest'' *Copy the new id_rsa.pub key to the myjaunty00admin folder and concatenate it to the authorized_keys file there: sudo cp /home/''myjaunty00guest''/.ssh/id_rsa.pub /home/''jauntyadmin00''/.ssh/id_rsaguest.pub sudo chown -R ''jauntyadmin00'' /home/''jauntyadmin00'' cd ~/.ssh cat authorized_keys id_rsaguest.pub >> authorized_keys Note: this new /home/''jauntyadmin00''/.ssh/authorized_keys file should also be copied to /home/client9260/.ssh/authorized_keys and /home/text9260/.ssh/authorized_keys as detailed in the subsequent OpenVistA EHR section. *If Windows-based PuTTY SSH users are to be added to the system, then see [http://kubuntuguide.org/All#PuTTY this tutorial]. The SSH keys must be tweaked to be used with OpenSSH, copied to the server, and then concatenated to the authorized_keys file in a similar fashion.
返回
模板:USJ New SSH Users
。
导航菜单
页面操作
模板
讨论
阅读
查看源代码
历史
页面操作
模板
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息