sshd (remote desktop) server, dotpup package

Stuff that has yet to be sorted into a category.
Message
Author
drj
Posts: 41
Joined: Sun 26 Jun 2005, 17:45

sshd (remote desktop) server, dotpup package

#1 Post by drj »

an openssh deamon I made for myself, in case someone on the same boat as I was, here comes the package

notes:
1. includes openssh deamon and its configuration file
2. add user sshd
3. modify hosts.allow and hosts.deny
4. menu entries for all three WMs
5. registers to pupget manager
6. need either set password for root or a new user with password to remotely connect.
Attachments
sshd-3.9p1.pup
openssh server, version 3.9p1
(133.9 KiB) Downloaded 7641 times

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#2 Post by rarsa »

Woow, you beat me to the finish line.

Actually you beat me to the start line.

That was going to be my next .pup after I finish the vncserver script and acompanying DotPup (I am translating the perl script into a simple bash script, I'm 90% there already)

Well, one less thing to worry about.

Thanks

User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

#3 Post by flamesage »

How do I set this up again?
Theres no execution file, nor can I access it from console.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#4 Post by rarsa »

Here is what I did:

- Install the DotPup Package by clicking on the downloaded file from Rox
- If you are booting from CD, you need to create a /var/empty folder everytime

Code: Select all

mkdir /var/empty
- Assign a password for root

Code: Select all

passwd
- Run the daemon specifying the full path

Code: Select all

/usr/sbin/sshd
If you want to see the options type

Code: Select all

sshd -h
To test it just connect to local host from the same computer

Code: Select all

ssh localhost
Now you can try connecting from another computer.
Last edited by rarsa on Sun 26 Feb 2006, 05:53, edited 1 time in total.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#5 Post by Flash »

Thank you, rarsa, that was excellent. One question: if you put nothing after "passwd," will it work (without entering a password?)

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#6 Post by rarsa »

If you put nothing after "passwd," will it work
If you don't assign password it won't work. SSH is by definition secure. It will always request a password and won't accept <empty> as password.

So, the options are as djr originally explained:

A) Set a root password as I showed in the previous post

or

B) Create a user:

Code: Select all

 adduser -h /root/rarsa -s /bin/bash rarsa

This command will do the following:
- Add a new user called rarsa
- Create a home directory /root/rarsa (normally the default would be /home/papa but in Puppy only /root is readwrite)
- Use bash as the default shell.

To connect as that user through ssh just execute the following command:

Code: Select all

ssh -l <user> <server address>
for example to test from the same computer as the user we just created:

Code: Select all

ssh -l rarsa localhost
I hope this helps

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#7 Post by dvw86 »

Great program, but I have a question. While I can connect to Puppy from other Puppy machines and my iBook, I can not get X11 to forward application windows. I get the error "Can't open display". I tried editing the file sshd_config and changed the line "#X11Forwarding no" to "#X11Forwarding yes" I then went to edit the ssh_config file but could not find it. Any ideas?

drj
Posts: 41
Joined: Sun 26 Jun 2005, 17:45

#8 Post by drj »

you might be trying to use X appl and DISPLAY has not be set. try following

1. before you connect, disable X auth
$ xhost +

2. $ ssh -Y remotehost

User avatar
dvw86
Posts: 636
Joined: Thu 05 May 2005, 00:55
Location: Washington State

#9 Post by dvw86 »

What is the -Y flag? I do not see it listed in the help, and when I type "ssh -Y root@myip" I get "illegal option --Y" and then a list of all the options.

User avatar
CapeCodCDog
Posts: 3
Joined: Sat 19 Nov 2005, 15:48
Location: Cape Cod, MA

#10 Post by CapeCodCDog »

I want to be able to "tunnel" x applications through ssh. I am having trouble getting the DISPLAY variable to be set automatically when I log in through ssh to the openssh (sshd). I do have the
X11Forwarding yes
in the sshd_config file.
The DISPLAY variable is not set at all (doesn't exist).
Here's a verbose log of my session:
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090702f
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.6.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'xxx.xxx.xxx.xxx' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
root@xxx.xxx.xxx.xxx's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: channel 0: request pty-req
debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: channel 0: request x11-req
debug1: channel 0: request shell
debug1: channel 0: open confirm rwindow 0 rmax 32768
debug1: Remote: No xauth program; cannot forward with spoofing.


Is this problem do to XAUTHORITY?
from the openssh.org FAQ
NOTE: For users of Linux Mandrake 7.2, Mandrake modifies the XAUTHORITY environment variable in /etc/skel/.bashrc, and thus any bash user's home directory. This variable is set by OpenSSH and for either of the above options to work, you need to comment out the line:
# export XAUTHORITY=$HOME/.Xauthority

Thanks in advance,

CapeCodCDog

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#11 Post by rarsa »

The Xvesa video driver in Puppy cannot forward X.

You can forward X from a client into the puppy X server, but not the other way around.

If you want to do that you will need to use the xserver dotpup provided by MU. Search the forum.

User avatar
CapeCodCDog
Posts: 3
Joined: Sat 19 Nov 2005, 15:48
Location: Cape Cod, MA

#12 Post by CapeCodCDog »

Thanks ...

I am able on a local network to manually set DISPLAY, i.e.:
export DISPLAY=192.168.0.12
and then start X apps. But this won't work if I'm coming in from outside through a router that is port forwarding, etc.

I was able to ssh in from the "outside" into a system running SuSE and the DISPLAY variable was set. I suppose I can try installing the other xserver (it will be on a "live-CD boot machine" so if I have too many problems it will be easy to start from scratch. Thanks again!

ostkaka
Posts: 3
Joined: Wed 21 Feb 2007, 17:22

OpenSSL version mismatch

#13 Post by ostkaka »

When i try to run the sshd deamon I get this:
OpenSSL version mismatch. Built against 90704f, you have 90802f

what can I do to solve this?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

Re: OpenSSL version mismatch

#14 Post by rarsa »

ostkaka wrote:When i try to run the sshd deamon I get this:
OpenSSL version mismatch. Built against 90704f, you have 90802f
Ooops.
ostkaka wrote:what can I do to solve this?
Recompile with the current OpenSSL libraries included in Puppy.

So after all your download from the OpenSSL will be useful.

You will need to compile it or wait until I compile it maybe today.

You may want to read this Wiki page http://puppylinux.org/wikka/Compiling although I am noticing that people have edited after I cleaned it up and now it is quite confusing.

Bottom line:
1. Download devx_214.sfs (or the version that corresponds to your puppy) from here and put it in the same place as your pup_save.2fs file

2. Untar the file you downloaded and read me the corresponding README or INSTALL file. it will usually tell you to open a console, cd to the folder where you uncompressed the tar file and do something like the following

Code: Select all

./configure
make
make install
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

llevet
Posts: 3
Joined: Fri 02 Mar 2007, 23:50
Location: Paris, France

#15 Post by llevet »

Hi rarsa,

I have the same issu.
So, could you compile sshd for puppy 2.14 (libssl 90802f), and post it on the forum ?
It will be cool !

Thank's !
:lol:

Ludo.

aspup
Posts: 1
Joined: Thu 08 Mar 2007, 20:46

sshd

#16 Post by aspup »

Hi rarsa,

I followed the instructions to compile openssh (and managed it finally, because I am a newbie with linux), but I still get the message

OpenSSL version mismatch. Built against 90704f, you have 90802f

How can I fix this? Do I have to remove a package or some files?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#17 Post by rarsa »

I haven't had time to get at this. I'd recommend

1. Search the forum for OpenSSL
2. Open a new thread explaining your problem

I am sure people have seen this issue before with other programs (I think it was firefox)
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

matrixfede
Posts: 3
Joined: Wed 14 May 2008, 12:49

#18 Post by matrixfede »

HI, I have problem:

I use puppy linux 4.0 and I do this for connect to remote pc:

# xhost +
#telnet xxx.xxx.xxx.xxx
#login
setenv DISPLAY xxx.xxx.xxx.xxx:0.0
then launch the application but i get the error can't open display.
In ubuntu i fixed thi error with gdmsetup then remove the mark on deny tcp connection, what i have to do i puppy dingo 4.0?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#19 Post by rarsa »

Why don't you use the

Code: Select all

ssh -X xxx.xxx.xxx.xxx
?[/code]
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

matrixfede
Posts: 3
Joined: Wed 14 May 2008, 12:49

#20 Post by matrixfede »

because i don't know...but is the same?

Wich is the procedure that i have to use?

Post Reply