SSH into 2691 router using QEMU in GNS3

choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
hey guys, I'm struggling to SSH into my the router using GNS3. Here's some snapshot that I took for easy understanding. It is not prompting for the username.

R3#show run
Building configuration...

Current configuration : 833 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name isick.com
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username choobysoo password 0 cisco
!
!
ip ssh version 2
!
!
!
!
!
interface FastEthernet0/0
ip address 10.10.10.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
transport input ssh
!
!
end

Comments

  • KrisAKrisA Member Posts: 142
    If I am not mistaken,

    You need login local
    WGU Progress BSIT:NA | Current Term:1 | Transfered To-Do In Progress Completed
    EWB2 BAC1 BBC1 TSV1 WFV1 CLC1 LAE1 LUT1 LAT1 AXV1 TTV1 INC1 INT1 TPV1 SST1 SSC1 GAC1 HHT1 TNV1 QLT1 BOV1 LET1 ORC1 IWC1 IWT1 MGC1 ABV1 AHV1 AJV1 TWA1 CPW2 BRV1
    Currently Reading
    Darril Book
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    I tried that, but it didn't work. Any more tips?
  • JpgonzalJpgonzal Member Posts: 32 ■■□□□□□□□□
    Did you remember to create your keys? crypto key generate rsa

    I had trouble with ssh myself, using the debug ssh helped. Login through console and look at the debug messages pop up as you try to connect. Hope this helps
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    Yes, I have crypto key generate rsa configured to 1024k... This is giving me a headache
  • gregorio323gregorio323 Member Posts: 201 ■■■□□□□□□□
    try to do ssh -l username <ipaddress>

    or you can check to see if the router is listening on port 22
    show control-plane host open-ports
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    try to do ssh -l username <ipaddress>

    or you can check to see if the router is listening on port 22
    show control-plane host open-ports

    The first command would still prompt me for my password only.. The show control-lnae host open-ports does not work. I assume that port 22 is open because I've not reconfigure in any ports and I have tried to redo this like 10 times already. I am thinking it is the QEMU is the problem.
  • gregorio323gregorio323 Member Posts: 201 ■■■□□□□□□□
    choobysoo wrote: »
    The first command would still prompt me for my password only.. The show control-lnae host open-ports does not work. I assume that port 22 is open because I've not reconfigure in any ports and I have tried to redo this like 10 times already. I am thinking it is the QEMU is the problem.

    make sure you enable secret because one you log in you wont be able to get into privilege mode unless you add privilege level 15 under the line vty. Also you need to use login local to log in with username and password.
    I've noticed you used ip domain name you should use ip domain-name. if you use login you must set a password.

    if your unsure if the 22 port is open you can do on the host machine

    telnet <ipaddress> <portnumber>

    if running windows 7 make sure you install the telnet client.
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    Hey Greg, I think that's the way the prompt shows. I did use ip domain-name but when show run it taken out the - for some reasons. I just added telnet to my vty, it prompts for the login and password, however it doesn't let me login. The ssh <ip> still only prompt me for the password. Thanks for helping.

    P.S The "ssh -l <ip>" works fine in packet tracer. But with GNS3 with QEMU as host, it would prompt for password, but when enter password it would return with Permission denied, please try again. Why permission denied? Do I have to change permission bin /bin/.ssh directory? Not too familiar with Linux.
  • gregorio323gregorio323 Member Posts: 201 ■■■□□□□□□□
    choobysoo wrote: »
    Hey Greg, I think that's the way the prompt shows. I did use ip domain-name but when show run it taken out the - for some reasons. I just added telnet to my vty, it prompts for the login and password, however it doesn't let me login. The ssh <ip> still only prompt me for the password. Thanks for helping.

    P.S The "ssh -l <ip>" works fine in packet tracer. But with GNS3 with QEMU as host, it would prompt for password, but when enter password it would return with Permission denied, please try again. Why permission denied? Do I have to change permission bin /bin/.ssh directory? Not too familiar with Linux.

    I've never used QEMU as a host i've always used the cloud.

    sorry i can't help you out with linux not too familiar with it either icon_sad.gif
  • MosGuyMosGuy Member Posts: 195
    Choobysoo,

    I re-created your lab & it works fine for me. As you can see by the screen shot. What password are you typing in ?

    ---
    XPS 15: i7-6700HQ, 256 pcie ssd, 32 GB RAM, 2 GB Nvidia GTX 960m, windows 10 Pro

    Cert in progress: CCNA (2016 revision)
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    Greg, Even though we didn't get very far with it but I thank you for your help, I picked up a few commands from you :)

    MosGuy, this is what is on my screen...
    ssh.jpg 91.1K
  • MosGuyMosGuy Member Posts: 195
    Just a quick thought. I wouldn't think this should affect it. Are you running GNS3 as administrator ?, i.e: right-click on the GNS3 shortcut and selecting "run as administrator". I do know some features can act strange if it's not set to run as admin

    Update: I was doing further testing & I came across the same denied error message. What seemed to cure it for me was removing the username and password with the "no" command, saving the config. Then pasting the username and password back in again. After that ssh started working again.
    ---
    XPS 15: i7-6700HQ, 256 pcie ssd, 32 GB RAM, 2 GB Nvidia GTX 960m, windows 10 Pro

    Cert in progress: CCNA (2016 revision)
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    I tried but no luck. Guess I should use the c1700 instead. I wonder if the image has problem, I will load a new image when I get back home from work tonight. Thanks
  • MosGuyMosGuy Member Posts: 195
    Did you try setting a different username and password ?. That also worked for me when I was getting the denied message using your original one. It is a strange error, first time I've seen the message myself. Almost seems like the image doesn't like that particular combination of user/pass. It possibly could be something with the image. I'm not on my GNS3 system currently so I can't verify which 2691 image I use. If it helps, I can check later on.
    ---
    XPS 15: i7-6700HQ, 256 pcie ssd, 32 GB RAM, 2 GB Nvidia GTX 960m, windows 10 Pro

    Cert in progress: CCNA (2016 revision)
  • choobysoochoobysoo Member Posts: 35 ■■□□□□□□□□
    LOL, you are right, for some reasons it doesn't like that name and password. I changed it and now I can ssh in fine. Who would thought of that :/ ?..... Now my problem solved but I am still wondering why when I run ssh <ip> it doesn't prompt me login then password, it is just password. I have to run ssh -l <login> <ip>. Anyways, thank you very much.
  • MosGuyMosGuy Member Posts: 195
    I set up two different user accounts, it still didn't prompt. Then I put in a cloud & tested through a terminal app, which did ask for a username. That's likely just how QEMU or tiny core works. I wouldn't worry about it. Your welcome, I'm glad I could help trouble-shoot & get SSH working for you :)
    ---
    XPS 15: i7-6700HQ, 256 pcie ssd, 32 GB RAM, 2 GB Nvidia GTX 960m, windows 10 Pro

    Cert in progress: CCNA (2016 revision)
Sign In or Register to comment.