我按照以下步骤设置ssh
以便在单个节点中运行hadoop,但是,一些如何运行sudo apt-get install openssh-server
给我一个下面的异常跟踪,可以解释一下此?
hduser@ubuntu:~$ sudo apt-get install openssh-server
[sudo] password for hduser:
Reading package lists... Done
Building dependency tree
Reading state information... Done
包
openssh-server
不可用,但由另一个包引用。 这可能意味着包裹丢失,已经过时或者 只能从其他来源获得
E: Package 'openssh-server' has no installation candidate
尝试了解决方案:
1#更新并安装,没有运气
sudo apt-get update
sudo apt-get install openssh-server
2#ssh,这不是解决这个问题的方法,但仅供参考,
ssh
给出了以下信息,
hduser@ubuntu:~$ which info
/usr/bin/info
而,
sshd
没有提供路径,
hduser@ubuntu:~$ which sshd
hduser@ubuntu:~$
3#fyi,
hduser@ubuntu:~$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
hduser@ubuntu:~$
hduser@ubuntu:~$ ssh -vvv localhost
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused
答案 0 :(得分:1)
您可以在终端上尝试以下命令来设置ssh。
sudo apt-get install ssh