SSH Permission denied for Mininet - linux

I am new to SDN and was trying to learn Mininet. I have installed debian(64-bit) and Mininet on Virtual Box. When I try to connect Mininet Vm from Debian I have to run the following comamnd :
ssh -X mininet#10.0.2.15
It asks for mininet password, but after entering the default mininet password it shows an error
Permission denied please try again
Both my debian and Mininet VM have same IP address. Kindly guide how to eliminate the SSHerror. Also is it fine having same ip address for two different VM, is the SSH error a result of this ?
Thanks

In the VirtualBox settings under the tab Network click on Advanced then Port Forwarding and add a rule with name: ssh, protocol: tcp, host port: 3022 and guest port: 22. Then execute:
sudo ssh -p 3022 mininet#10.0.2.15

Related

Is it possible to install GitLab server on virtual machine with a invalid IP address?

I have installed GitLab server on a virtual machine (VMWare). GitLab IP address is 192.168.1.4 . I can see GitLab from browser. I generated ssh-key and added to GitLab server.
When I run ssh -T git#192.168.1.4 I got this error:
ssh: connect to host 192.168.1.4 port 22: Connection refused
Not only you need to run SSHD in your GitLab server (type netstat -l -t -n to check that it listens on port 22, as in here).
But you also need to check for:
firewall rules
port mapping (in your VMWare configuration)

Cannot access Kaa Sandbox SSH

I wanted to ssh into Kaa's sandbox using ssh kaa#127.0.0.1 -p 2222 given in the virtual machine to us and also in one of the Data Collection demo where it said that we need to ssh into kaa's sandbox then we can see our mongoDB using our application token of our demo to see data saved into it.
But we do know the password is kaa123. But I tried 4 times, it shows permission denied, please try again until it shows permission denied (publickey,password).
ThusIi would like to seek help. I haven set up anything apart from downloading cmake, gcc. I changed the port on Raspberry pi to port 2222. Raspberry pi is connected to my computer using an Ethernet cable.
Raspberry pi static ip address : 169.254.220.68
Computer static ip address : 169.254.220.135
Kaa's sandbox ssh address is : ssh kaa#127.0.0.1 -p 222
Your answers are really very very important to us as we have been stuck for days for our mini Final Year Project.
As I understood, the situation is next:
Kaa Sandbox is running in VirtualBox image on host 169.254.220.135
Raspberry Pi has IP address 169.254.220.68
You tries to get to Kaa Sandbox by ssh from Raspberry Pi
Kaa Sandbox shows in terminal that you can access its SSH via localhost (127.0.0.1) port 2222
If that is correct, the technical details are as follows:
You should be able (if you didn't change Kaa Sandbox configuration) to access the Kaa Sandbox from your VirtualBox host just as it is shown in the Kaa Sandbox terminal:
ssh kaa#localhost -p 2222
Please try this first. Should this fail you will not be able to pass the further checks below.
The Kaa Sandbox is shiped with NAT networking mode configuration. This means (among other things) that its internal IP addresse(s) (including 10.0.2.15) cannot be reached from outside. That is, you cannot connect to this address from Raspberry Pi and even from your VirtualBox host. NAT hides them under the VirtualBox host IP address.
To enable access to the Kaa Sandbox from outside we pre-configured the Kaa Sandbox VirtualBox image to forward several ports from your host IP address to the internal IP address (10.0.2.15) which is under NAT. The port forwarding configuration is next:
${HostIP}:2222 -> 10.0.2.15:22
This means that all the connections to ${HostIP}:2222 will be forwarded to the Kaa Sandbox's 10.0.2.15:22.
Thus:
You should be able to get Kaa Sandbox SSH locally by kaa#localhost -p 2222 and by host IP: kaa#169.254.220.135 -p 2222
You need to use your host IP from remote: kaa#169.254.220.135 -p 2222
Please let me know if something is unclear here or does not work for you.
127.0.0.1 always points to your own computer. If kaa's sanbox is in your Raspberry Pi, try ssh kaa#169.254.220.68 -p 2222

Telnet [Unable to connect to remote host: Connection refused]

I was trying to create a telnet connection between Ubuntu and Guest OS (Kali). But the problem "Unable to connect to remote host: Connection refused" occurs in both Ubuntu terminal and Guest OS (Kali) Terminal. I configured Guest OS's ip settings as follows and I can send ping packets perfectly from both side.
According to ping packets sent and received, it seems there is no problem about connection line between these two system. But when I try to enter
In Ubuntu:
telnet ipAddressOfGuestOS
or
In Guest OS:
telnet ipAddressOfUbuntu
the terminal returns "Unable to connect to remote host: Connection refused" error. How can I handle this problem?
0.Configure Guest OS via Virtualbox as follows.
VirtualBox Manager > Settings > Network
Attached to: Bridged Adapter
Name : eth0
Advanced:
Promiscuous Mode: Allow All
1.Install telnet use this command in main OS terminal:
sudo apt-get install xinetd telnetd
2.Edit /etc/inetd.conf in main OS using your favourite file editor with root permission,add this line:
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
3.Edit /etc/xinetd.conf in main OS,make its content look like following:
Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
4.Use this command to start telnet server in main OS:
sudo /etc/init.d/xinetd restart
That was all. By the way, this configuration will affect just main OS which you use instead of Guest OS. That is, you can create a telnet connection just from Guest OS's terminal to main OS, not from main OS to Guest OS. Because, telnet server is in main OS. To be able to do two way telnet communication, you should repeat the steps above in Guest OS's terminal.
Resource : http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux
Attention: if you flush iptables (when run: iptables -F) it can just close your ssh connection, so you will not be able to connect to your server again
Check iptable rules.
iptables -L
Flush iptables
iptables -F
Try telnet again
first we need to see ubuntu system log with this command
sudo gedit /var/log/syslog
and if you will see this error "execv( /usr/sbin/tcpd ) failed: No such file or directory" then run this command
sudo apt-get install tcpd
it will solve your problem (if not then you need to search your system error on google)
Check telnet service is running
psgrep xinetd

Connect two local linux computers via ssh

I would like to know how to connect two linux computers (Ubuntu and OpenSuse) via SSH. When I try to run this command on Suse:
ssh 192.168.1.37
I get error:
ssh : connect to host 192.168.1.37 port 22 : connection refused.
When I try to connect from Ubuntu PC with the same command and Suse's IP, I get "connection timeout" error.
Any help would be appreciated.
Install SSH server in the machine you want to connect, by issuing the command:
sudo apt-get install openssh-server -y
After that, you can connect to that machine by executing the following command:
ssh user#ip_address
where user is the name of the user in that machine you want to connect to with which you want to be authenticated, and ip_address is the IP address of that same machine.
When logging in, try to specify the user you want as well, so that the command looks something like this
ssh example#192.168.1.37
Try using this if its default user
ssh root#192.168.1.16
ssh root#device_ip_address
root is the default user for dietpi
Try the following command by specifying the username followed by # and the IP address (i.e. the hostname).
ssh user#192.168.1.1
Here, user is the username of the user in the machine you want to connect to, followed by the IP address of the host, which in this case is 192.168.1.1.

ssh: Connection refused while trying ssh from host (centOS 6.5) to guest server (on oracle virtual box, ubuntu 15)

I have setup ubuntu 15 on oracle virtual box on centOS 6.5 (host), using Bridged Network utility. When I'm login from guest server to host server using ssh, it works fine but if I am trying to login from host server to guest, it throws an error:
ssh: connect to host 10.0.41.143 port 22: Connection refused
FYI,
Host IP: 10.0.61.49
Guest IP: 10.0.41.143
Adding as an answer (copied from my comments on the OPs question) so that others may find the answer more easily. (and Hemant can mark it as correct :) )
Is the ssh daemon running on the guest?
There is a ssh client (the one you use to login from) and a ssh server - the target machine you're trying to login to .. you may have the client on the guest, but not the server (sshd)
Check for firewall. It could be blocking the incoming connection on port 22.
Thanks FreudianSlip,
I had only ssh client on my guest server, but not ssh-server daemon.
Installation of ssh-server, resolved the problem :)

Resources