[sf-lug] request for help re ssh -- sshd login failure

Michael Paoli Michael.Paoli at cal.berkeley.edu
Mon Feb 8 04:41:22 PST 2016


Let's see ...
http://linuxmafia.com/pipermail/sf-lug/2016q1/011674.html
...
i686 i686 i386
Ubuntu 12.04.2 LTS
$ ssh lerner at ...
...
https://www.wiki.balug.org/wiki/doku.php?id=balug:cds_and_images_etc
...
// my comments on lines staring with //
// some of this has nothing to do with the reported ssh/sshd issue
// I did this on virtual machine, and (mostly) with serial console
// and also enabling login on serial ... yeah, much unrelated,
// but convenient for me :-) ...
# virt-install --name=ubuntu12042i386  
--cdrom=/tmp/ubuntu-12.04.2-desktop-i386.iso --nodisks --livecd  
--network=network=default --ram=1024 --wait=-1 --os-type=linux  
--os-variant=ubuntuprecise --virt-type kvm --hvm
...
console=tty0 console=ttyS0,9600n8
...
// that gives serial console, but not serial login,
// so, from graphics console:
xterm
$ sudo su -
# /bin/login -f ubuntu </dev/ttyS0 > /dev/ttyS0 2>&1 &
// now we have single temporary instance of our serial login,
// procede with that:
$ sudo su -
// set up or "permanent" serial login (well, on "live", but whatever)
# sed -e 's/tty1/ttyS0/g' < /etc/init/tty1.conf > /etc/init/ttyS0.conf
# chown --reference=/etc/init/tty1.conf /etc/init/ttyS0.conf
# chmod --reference=/etc/init/tty1.conf /etc/init/ttyS0.conf
# service ttyS0 start && exit
// and login on that serial, etc.
$ sudo su -
# useradd -m lerner && passwd lerner
# apt-get -y install openssh-server
# echo $(lsb_release -d) $(uname -m)
Description: Ubuntu 12.04.2 LTS i686
# (cd /etc/ssh && for f in *key.pub; do ssh-keygen -l -f "$f"; done)
1024 04:8e:06:ae:1b:f5:46:b3:38:99:df:90:4f:49:d2:e9  root at ubuntu (DSA)
256 7b:cf:1f:3e:1f:95:bc:63:21:00:80:9a:44:65:04:44  root at ubuntu (ECDSA)
2048 42:34:7b:7b:fe:94:00:a4:de:5d:85:58:74:b4:8b:55  root at ubuntu (RSA)
# ip -4 a s | fgrep 192.
     inet 192.168.122.220/24 brd 192.168.122.255 scope global eth0
// meanwhile, elseclient/elsehost:
$ ip -4 a s | fgrep 192.168.122.
     inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
$ ssh -ax -l lerner 192.168.122.220
The authenticity of host '192.168.122.220 (192.168.122.220)' can't be  
established.
ECDSA key fingerprint is 7b:cf:1f:3e:1f:95:bc:63:21:00:80:9a:44:65:04:44.
// we check that this matches before we say "yes"
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.122.220' (ECDSA) to the list of  
known hosts.
lerner at 192.168.122.220's password:
...
// and we're in:
$ ip -4 a s | fgrep 192; hostname; id; ls -ld ~ /home
     inet 192.168.122.220/24 brd 192.168.122.255 scope global eth0
ubuntu
uid=1000(lerner) gid=1000(lerner) groups=1000(lerner)
drwxr-xr-x 1 root   root    80 Feb  8 12:08 /home
drwxr-xr-x 3 lerner lerner 140 Feb  8 12:15 /home/lerner
$ echo $(lsb_release -d) $(uname -m)
Description: Ubuntu 12.04.2 LTS i686
$
// anyway, enough 'o that ...
# virsh list --all
  Id    Name                           State
----------------------------------------------------
  8     balug                          running
//     ^^^^^ - that's also the VM running all SF-LUG stuff except the list
  9     ubuntu12042i386                running
  -     blackie                        shut off
  -     debiansidplusexperimentalamd64 shut off

# virsh destroy ubuntu12042i386
Domain ubuntu12042i386 destroyed

# virsh undefine ubuntu12042i386
Domain ubuntu12042i386 has been undefined

#
// the virt-install command above was actually run from script, not
// manually input like that.  Here's hint how I *really* did it:
# diff TEMPLATE ubuntu12042i386
11c11
< PATHTOISO="${PATHTOISO:-$(awk '/^[    ]*#/  
{next;};{if($2=="/media/cdrom9"){print $1;exit;};}' /etc/fstab)}"
---
> PATHTOISO=/tmp/ubuntu-12.04.2-desktop-i386.iso
27c27
< LIVECD=
---
> LIVECD=y
49c49
< OS_VARIANT=debianwheezy
---
> OS_VARIANT=ubuntuprecise
99a100
> set -x
#
$





More information about the sf-lug mailing list