The power of SSH

Random irrelevance that just didn't fit into other forums. Talk about anything.

Moderator: Talkative People

Post Reply
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

The power of SSH

Post by M_D_K »

What happens when you add ssh and dc-tool together? you get a dreamcast in another country doing shit 'magically' :)

Code: Select all

(10:17:01 PM) Falco: What linux voodoo do I need
(10:17:02 PM) Falco: OH FUCK
(10:17:04 PM) M_D_K: :D
(10:17:12 PM) M_D_K: it worked
(10:17:16 PM) M_D_K: I had to arp first
(10:17:19 PM) Falco: what did you send?
(10:17:24 PM) Falco: black screen.
(10:17:24 PM) M_D_K: lua test
(10:17:29 PM) Falco: you getting the output?
(10:17:45 PM) Falco: and you just reset my DC.
(10:17:53 PM) Falco: Post this shit on the forums.
(10:18:03 PM) Falco: You're remotely compiling and sending to my DC from a different country via SSH
(10:18:05 PM) Falco: holy fuck.
(10:18:06 PM) Falco: bubbles!
(10:18:09 PM) M_D_K: ;)
(10:18:24 PM) Falco: this is fucking 1337.
and my ssh window

Code: Select all

mdk@ubuntu-server:~/lua_dc_test$ sudo arp -s 192.168.1.6 00d0f102b32d
mdk@ubuntu-server:~/lua_dc_test$ dc-tool -x lua_dc_test.elf -t 192.168.1.6
Console enabled
Upload <lua_dc_test.elf>
File format is elf32-shl, start address is 0x8c010000
Section .text, lma 0x8c010000, size 340608
Section .rodata, lma 0x8c063280, size 37064
Section .eh_frame, lma 0x8c06c348, size 228
Section .ctors, lma 0x8c06c4ac, size 8
Section .dtors, lma 0x8c06c4b4, size 8
Section .data, lma 0x8c06c4c0, size 12700
Section .stack, lma 0x300000, size 4
transferred 390620 bytes at 1047019.657994 bytes / sec
Executing at <0x8c010000>
Sending execute command (0x8c010000, console=1, cdfsredir=0)...executing

--
KallistiOS ##version##: Sat Dec 19 22:36:22 CST 2009
  mdk@ubuntu-server:/usr/local/dc/kos
thd: pre-emption enabled, HZ=100
maple: active drivers:
    Dreameye (Camera): Camera
    Sound Input Peripheral: Microphone
    PuruPuru (Vibration) Pack: JumpPack
    VMU Driver: Clock, LCD, MemoryCard
    Mouse Driver: Mouse
    Keyboard Driver: Keyboard
    Controller Driver: Controller
  DMA Buffer at ac0a5ce0
vid_set_mode: 640x480 NTSC
dc-load console support enabled
maple: attached devices:
  A0: Dreamcast Controller          (01000000: Controller)
  A1: Visual Memory                 (0e000000: Clock, LCD, MemoryCard)
  B0: Keyboard                      (40000000: Keyboard)
string - y
number - x
result of luaL_dofile() is 0
arch: shutting down kernel
maple: final stats -- device count = 3, vbl_cntr = 5, dma_cntr = 5
vid_set_mode: 640x480 NTSC
mdk@ubuntu-server:~/lua_dc_test$ dc-tool -r -t 192.168.1.6
Reseting...
mdk@ubuntu-server:~/lua_dc_test$ dc-tool -x ../bubbles/bubbles.elf -t 192.168.1.6
Console enabled
Upload <../bubbles/bubbles.elf>
File format is elf32-shl, start address is 0x8c010000
Section .text, lma 0x8c010000, size 278624
Section .rodata, lma 0x8c054060, size 33452
Section .eh_frame, lma 0x8c05c30c, size 228
Section .ctors, lma 0x8c05c470, size 8
Section .dtors, lma 0x8c05c478, size 8
Section .data, lma 0x8c05c480, size 13308
Section .stack, lma 0x300000, size 4
transferred 325632 bytes at 979524.063003 bytes / sec
Executing at <0x8c010000>
Sending execute command (0x8c010000, console=1, cdfsredir=0)...executing

--
KallistiOS ##version##: Sat Dec 19 22:36:22 CST 2009
  mdk@ubuntu-server:/usr/local/dc/kos
thd: pre-emption enabled, HZ=100
maple: active drivers:
    Dreameye (Camera): Camera
    Sound Input Peripheral: Microphone
    PuruPuru (Vibration) Pack: JumpPack
    VMU Driver: Clock, LCD, MemoryCard
    Mouse Driver: Mouse
    Keyboard Driver: Keyboard
    Controller Driver: Controller
  DMA Buffer at ac09e040
vid_set_mode: 640x480 NTSC
dc-load console support enabled
maple: attached devices:
  A0: Dreamcast Controller          (01000000: Controller)
  A1: Visual Memory                 (0e000000: Clock, LCD, MemoryCard)
  B0: Keyboard                      (40000000: Keyboard)
pvr: disabling vertical scaling for VGA
Bubbles KGL sample: press START to exit, A to toggle sphere type
that is all ;)
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
User avatar
kamokow
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 68
Joined: Wed Aug 05, 2009 9:36 pm
Programming Language of Choice: C++
Location: Canada

Re: The power of SSH

Post by kamokow »

Thats... awesome, on so many levels. Ill leave it at that.
Image
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: The power of SSH

Post by Trask »

So, no more excuses of devs not being at home to work on the game?


SSH tutorial for iPOD Touches, so dev on the iPOD and compile it from where ever you are using the above...get to work Falco! :D

http://www.ipodtouchhacks.com/ipod-touc ... ow-to-ssh/
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

Re: The power of SSH

Post by M_D_K »

yeah I do that for my itouch, I made a template Makefile which handles pretty much everything

Code: Select all

APPNAME="GLTest"
CC=arm-apple-darwin9-gcc
CXX=arm-apple-darwin9-g++
LD=$(CC)
SRC=src
IMG=img/

LDFLAGS=	-lobjc \
		-bind_at_load \
		-framework Foundation \
		-framework CoreFoundation \
		-framework UIKit \
		-framework QuartzCore \
		-framework OpenGLES \
		-framework CoreGraphics \
		-F/usr/local/iphone-toolchain/sys/System/Library/PrivateFrameworks \
		-framework GraphicsServices \
		-w

all: $(APPNAME) bundle

OBJS=$(patsubst %.m,%.o,$(wildcard $(SRC)/*.m))
OBJS+=$(patsubst %.mm, %.o, $(wildcard $(SRC)/*.mm)) 
OBJS+=$(patsubst %.c,%.o,$(wildcard $(SRC)/*.c))
OBJS+=$(patsubst %.cpp,%.o,$(wildcard $(SRC)/*.cpp))

$(APPNAME): $(OBJS)
	$(LD) $(LDFLAGS) -o $@ $^

%.o:    %.mm
	$(CC) -c $(CPPFLAGS) $< -o $@

%.o:	%.m
	$(CC) -c $(CFLAGS) $< -o $@

%.o:	%.c
	$(CC) -c $(CFLAGS) $< -o $@

%.o:	%.cpp
	$(CC) -c $(CPPFLAGS) $< -o $@

bundle: $(APPNAME)
	@echo "Bundling $(APPNAME) to $(APPNAME).app"
	@mkdir -p $(APPNAME).app
	@cp $(APPNAME) $(APPNAME).app/$(APPNAME)_
	@cp ${IMG}* $(APPNAME).app
	$(shell ./create_shit.sh $(APPNAME))
	@cp Info.plist $(APPNAME).app
	@cp $(APPNAME).sh $(APPNAME).app/$(APPNAME)

install: clean bundle
	@echo "Installing $(APPNAME) at $(IP)"
	@echo "If you don't want to get asked for your pass 3 times set up ssh keys ;)"
	@ssh root@$(IP) "cd /Applications && rm -Rf $(APPNAME).app"
	@scp -rp $(APPNAME).app root@$(IP):/Applications
	@echo "Oh yeah you need sudo on the iphone/itouch as well(it's in Cydia)"
	@ssh root@$(IP) "cd /Applications/$(APPNAME).app ; ldid -S $(APPNAME)_; sudo -u mobile uicache"

uninstall:
	@echo "Uninstalling $(APPNAME) at $(IP)"
	@ssh root@$(IP) "cd /Applications && rm -Rf $(APPNAME).app; sudo -u mobile uicache"

clean:
	@echo "Cleaning..."
	@rm -f $(SRC)/*.o
	@rm -Rf $(APPNAME).app
	@rm -f $(APPNAME).sh
	@rm -f $(APPNAME)
	@rm -f Info.plist
create_shit.sh modifies a template info.plist to one suited to your app (right now verry limited)

Code: Select all

#/bin/bash

if [ $# -eq 0 ]; then
	echo "usage: create_shit.sh [APPNAME]";
	exit 0
fi

if [ -e "./$1.sh" ]; then
	echo "launcher exists, not recreating";
	exit 0
fi

#used so your app will more than likely launch properly as there are sometimes problems with which directory it's launched 'from'
echo "#!/bin/bash" > "$1.sh"
echo "HT=\$(dirname \"\$0\")" >> "$1.sh"
echo "exec \"\${HT}\"/$1_" >> "$1.sh"
chmod a+x "$1.sh"
cp .info.plist Info.plist

APPLOWER=`echo $1 | tr A-Z a-z `;
#I'll probably end up making this better so you can pass options and it
#totally generates an Info.plist not just modifies an existing one
sed -i "s/APPNAME/$1/" Info.plist
sed -i "s/APPLOWER/$APPLOWER/" Info.plist
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: The power of SSH

Post by Falco Girgis »

Trask wrote:So, no more excuses of devs not being at home to work on the game?


SSH tutorial for iPOD Touches, so dev on the iPOD and compile it from where ever you are using the above...get to work Falco! :D

http://www.ipodtouchhacks.com/ipod-touc ... ow-to-ssh/
Dude, I've been compiling for Dreamcast/PSP and even updating our repositories from SSH-ing via my iPhone for months now. ;)
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: The power of SSH

Post by Trask »

GyroVorbis wrote:
Trask wrote:So, no more excuses of devs not being at home to work on the game?


SSH tutorial for iPOD Touches, so dev on the iPOD and compile it from where ever you are using the above...get to work Falco! :D

http://www.ipodtouchhacks.com/ipod-touc ... ow-to-ssh/
Dude, I've been compiling for Dreamcast/PSP and even updating our repositories from SSH-ing via my iPhone for months now. ;)

LOL, that's great :D
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: The power of SSH

Post by dandymcgee »

:worship: No words...
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: The power of SSH

Post by avansc »

this has been going for 40 years. i think the telnet RFC is one of the first, certainly in the first 50. not encrypted like SSH and not as nice, altho ssh does not support some archaic archs(OS2), so in some instances telnet is still used. but remote consoles have been around since moses.

but pretty neat shit non the less.

edit: http://www.ietf.org/rfc/rfc0015.txt?number=15
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: The power of SSH

Post by dandymcgee »

avansc wrote:this has been going for 40 years. i think the telnet RFC is one of the first, certainly in the first 50. not encrypted like SSH and not as nice, altho ssh does not support some archaic archs(OS2), so in some instances telnet is still used. but remote consoles have been around since moses.

but pretty neat shit non the less.

edit: http://www.ietf.org/rfc/rfc0015.txt?number=15
I knew that, I love SSH. I had just never thought of using it to remotely compile a project on a Sega DreamCast. 8-)
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply