个人工具
登录
查看“模板:USJ New SSH Users”的源代码 - Ubuntu中文
模板
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“模板: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
。