Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Washuu-Chan
Apr 17, 2003

Washuu-Sama to Oyobi!
Ok, I figured it out. Apparently tun/tap doesn't create character devices (properly?), instead an application has to open them via /dev/net/tun which also creates appropriate network interfaces in process.

Here's the tunpipe application I wrote. It creates two interfaces tap0 and tap1 and pumps packets between these. I just tested it with wpa_supplicant and hostapd and it worked great. So, if anyone's interested :

code:
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <poll.h>
#include <linux/if.h>
#include <linux/if_tun.h>

/* taken from linux kernel Documentation/networking/tuntap.txt */
int tun_alloc(char *dev) {
    struct ifreq ifr;
    int fd, err;

    if( (fd = open("/dev/net/tun", O_RDWR)) < 0 )
        return -1;

    memset(&ifr, 0, sizeof(ifr));

    ifr.ifr_flags = IFF_TAP;
    if( *dev )
        strncpy(ifr.ifr_name, dev, IFNAMSIZ);

    if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ) {
        close(fd);
        return err;
    }
    return fd;
}

static int pump(struct pollfd * from, struct pollfd * to) {
    char buf[4096];
    if (from->revents & POLLIN) {
        ssize_t rbytes = read(from->fd, buf, sizeof(buf));
        if ( rbytes < 0 ) {
            printf("Error reading fd %d : %d %s\n",
                   from->fd,errno,strerror(errno));
            return -1;
        }

        ssize_t wbytes = write(to->fd, buf, rbytes);
        if ( wbytes < 0 ) {
            printf("Error writing fd %d : %d %s\n",
                   to->fd,errno,strerror(errno));
            return -1;
        }
    }
    return 0;
}

int main(int ac, char ** av) {
    int pipe0 = tun_alloc("tap0");
    int pipe1 = tun_alloc("tap1");

    if (pipe0<0 || pipe1<0) {
        printf("Failed to open both tap devices\n");
        return 1;
    }

    printf("pipe0 : %d   pipe1 : %d\n",pipe0, pipe1);

    while(1) {
        char buf[4096];
        struct pollfd fds[2];
        fds[0].fd = pipe0;
        fds[0].events = POLLIN;
        fds[0].revents = 0;
        fds[1].fd = pipe1;
        fds[1].events = POLLIN;
        fds[1].revents = 0;

        if ( poll(fds, 2, 10) < 0 ) {
            printf("poll failed : %d %s\n",errno,strerror);
            return 1;
        }

        if ( pump(&fds[0],&fds[1]) < 0 ) return 2;
        if ( pump(&fds[1],&fds[0]) < 0 ) return 2;
    }
    return 0;
}
Usage:
code:
gcc -o tunpipe tunpipe.c
modprobe tun
./tunpipe
ifconfig tap0 up
ifconfig tap1 up

Adbot
ADBOT LOVES YOU

dfn_doe
Apr 12, 2005
I FOR ONE WELCOME OUR NEW STUPID FUCKING CATCHPHRASE OVERLORDS

Saukkis posted:

Another option would be to use filesystem labels.

That'd probably work fine, but I can't see any good reason to move too far away from the default FS setup in ubuntu. Primarily because it is a desktop oriented system and access to the FS is primarily handled through the layers of abstraction provided by nautilus. Changing to FS labels from UUID based addressing may end up breaking some rudimentary OS functionality during a future patch/upgrade which I'd be willing to bet that most desktop users would rather not worry about.

Weird Uncle Dave
Sep 2, 2003

I could do this all day.

Buglord
My boss decided we need a new core router, and he bought one from Imagestream, which basically looks like he paid $3000 for a $500 PC running Linux. The fancy menus are nice, though, I'll give 'em that.

Anyway, it uses iptables for its firewalling, and I'm trying to get a bit more clever than I probably should. The iptables man page says:

-i, --in-interface [!] name
Name of an interface via which a packet was received (only for packets entering the INPUT, FORWARD and PREROUTING chains). When the "!" argument is used before the interface name, the sense is inverted. If the interface name ends in a "+", then any interface which begins with this name will match. If this option is omitted, any interface name will match.


Basically, it implies you can only use interface names in the system-defined chains (INPUT, FORWARD, OUTPUT, et cetera) and not in chains you create. Can anyone confirm whether you can (or can't) use, say, '-i eth0' in your own chains?

Slow is Fast
Dec 25, 2006

I'd like to set up an FTP server for some files. Which program should I use? Something easy to set up? Would there be one that I can access in web page format from anywhere as long as I know the URL? Links to tutorials because I am a little :banjo: :downs:

m5
Oct 1, 2001

Cellwind929 posted:

I'd like to set up an FTP server for some files. Which program should I use? Something easy to set up? Would there be one that I can access in web page format from anywhere as long as I know the URL? Links to tutorials because I am a little :banjo: :downs:

PureFTP is often recommended as solid, simple, and secure. Don't know about if/how it supports anything special for web access, though browsers generally understand "ftp://" URLs and know how to do the protocol and synthesize pages for you.

nex
Jul 23, 2001

øæå¨æøåø
Grimey Drawer
I have a quick question:

I want to run Ubuntu on my laptop. The only problem is that I have Vista installed and I only have one partition. Preferably I would like to partition the drive without having to reformat and screw up the Windows installation. I gave Wubi a quick try but the Vista support is scetchy to say the least and it didnt work.

Partition Magic can partition the main partition. The problem there is that its way old now and it doesnt play nice with Vista.

So what should I do? Just bite the bullet and do a format to get proper partitions or is there a simpler solution for me?

Void Chicken
Jan 13, 2007

nex posted:

I have a quick question:

I want to run Ubuntu on my laptop. The only problem is that I have Vista installed and I only have one partition. Preferably I would like to partition the drive without having to reformat and screw up the Windows installation. I gave Wubi a quick try but the Vista support is scetchy to say the least and it didnt work.

Partition Magic can partition the main partition. The problem there is that its way old now and it doesnt play nice with Vista.

So what should I do? Just bite the bullet and do a format to get proper partitions or is there a simpler solution for me?

The Ubuntu installer can shrink your Vista partition and make a new one (plus the swap) for Linux. You can defrag Vista beforehand to make it easier on the partitioner, but it's not required.

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

nex posted:

I have a quick question:

I want to run Ubuntu on my laptop. The only problem is that I have Vista installed and I only have one partition. Preferably I would like to partition the drive without having to reformat and screw up the Windows installation. I gave Wubi a quick try but the Vista support is scetchy to say the least and it didnt work.

Partition Magic can partition the main partition. The problem there is that its way old now and it doesnt play nice with Vista.

So what should I do? Just bite the bullet and do a format to get proper partitions or is there a simpler solution for me?

Try colinux. Dunno how it works under Vista, though.

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

Marinmo posted:

A while ago, 2-3 weeks or so, it was reported that AMD (ATI) would open-source their drivers. Having a x800 PRO this was great news. Have they been released yet? I'm not exactly expecting any advancements made in the next 6 months or so, but it'd be good to know for future reference.
Yeah, this was Henri Richard talking out of his rear end. It's certainly not happening yet, and I'd be very surprised if it ever happens.

Also, Jesus Christ how do I make the Firefox fonts in Linux not look like absolute rear end. For whatever reason they seem okay on my laptop (Feisty) but on my desktop with Fedora 7 they look hooooooorrrrrrible (and no amount of subpixel smoothing seems to be doing anything).

edit 2: switching to liberation fonts and setting DPI to 112 seems a lot nicer. hooray.

Professor Science fucked around with this message at 06:51 on Jun 13, 2007

crazysim
May 23, 2004
I AM SOOOOO GAY

JoeNotCharles posted:

Try colinux. Dunno how it works under Vista, though.

The Windows kernel had some crazy changes done to it. I'll be weary of colinux. If want to run Ubuntu, you should probably do it in VMWare, since I know that works.

SheriffHippo
Jul 18, 2002
How can I get Non-smoothed fonts to look good?
(In Ubuntu, or Linux distros in general)

The default fonts in Ubuntu look terrible when font smoothing is turned off, as if they were never meant to be shown that way.

The fonts in 'drat Small Linux' are not smoothed by default, and they look great. I would like fonts to look like this in Ubuntu.

Things I have tried:

1. Installing the Microsoft font set. This works in some places, but not in others. The Gnome "taskbar" and the Firefox UI, for example.

2. Ran Fluxbuntu LiveCD. This is an improvement over Ubuntu, but the Firefox UI fonts are still bad, and even the desktop fonts aren't exactly perfect, but acceptable.


What is the proper procedure to get true aliased fonts everywhere, like they are in 'drat Small Linux'?



Comparison image:

edit: Thanks teapot, all fixed now :)

SheriffHippo fucked around with this message at 17:41 on Jun 13, 2007

teapot
Dec 27, 2003

by Fistgrrl

SheriffHippo posted:

What is the proper procedure to get true aliased fonts everywhere, like they are in 'drat Small Linux'?
code:
sudo dpkg-reconfigure fontconfig-config
In particular, enabling raster fonts should add prebuilt non-antialiased fonts (Helvetica, Times, Fixed, Lucida whatever...) that look good in their original form and are familiar to X users from old pre-Xft days.

teapot
Dec 27, 2003

by Fistgrrl

JoeNotCharles posted:

Try colinux. Dunno how it works under Vista, though.
I _really_ don't think, it's going to be an improvement over just shrinking Vista partition. Worst of both worlds combined, and under a drastically changed Windows kernel no less.

Fortuitous Bumble
Jan 5, 2007

I've been trying to get my laptop to suspend to RAM properly with gentoo. I compiled the suspend-2 kernel and installed vbetool to get my monitor to turn back on, now it seems to suspend properly, but when I unsuspend it reboots the computer.

Any idea what kind of steps I could take to figure out why it's doing this? I was working on it a while ago and then I sort of stopped, so I'm not sure where to start for getting this working right.

kyuss
Nov 6, 2004

Alright, it's me again with a modified Ubuntu LiveCD (Desktop, x86 architecture) that frequently crashes on my Dad's PC :(

Basically what I did was take the original Ubuntu Desktop LiveCD, free up some space by removing OpenOffice and Gimp, and add programs like sshd, ntfs-config, tvtime, mplayer and mencoder to it. The idea was to have a LiveCD my Dad could boot from to record some old VHS tapes with a TV card his lovely XP64 doesn't support.

Testing the CD on VMware showed no problems, so I burned it on CD and tried it out on the real PC: first it seemed to work, but then it began to crash with increasing frequency. First it was every ten minutes or so, at the end I could barely open a shell or click on a menu entry without Ubuntu terminally crapping itself :(

I suspected some thermal issue first, but the CD drive doesn't get particularly hot :confused:

Could it be the fact that my Dad's machine has an Athlon 64 CPU?
Is there some error log I could check for unusual entries?
Maybe running everything from RAM instead of the CD would help - how would I do this?

Any help is, as always, appreciated :)

Soggy Chips
Sep 26, 2006

Fear is the mind killer
I've got a wee 4x400gig mdadm array running on a ubuntu box sitting down in the basement, question is can I simply extend the array to have another 400 in it keeping the existing data?

and which command do I use as there is growing and rebuilding and I don't want risk the wrong option with that much data

teapot
Dec 27, 2003

by Fistgrrl

kyuss posted:

Alright, it's me again with a modified Ubuntu LiveCD (Desktop, x86 architecture) that frequently crashes on my Dad's PC :(

Basically what I did was take the original Ubuntu Desktop LiveCD, free up some space by removing OpenOffice and Gimp, and add programs like sshd, ntfs-config, tvtime, mplayer and mencoder to it. The idea was to have a LiveCD my Dad could boot from to record some old VHS tapes with a TV card his lovely XP64 doesn't support.

Testing the CD on VMware showed no problems, so I burned it on CD and tried it out on the real PC: first it seemed to work, but then it began to crash with increasing frequency. First it was every ten minutes or so, at the end I could barely open a shell or click on a menu entry without Ubuntu terminally crapping itself :(
How does the "crash" look like? Complete lockup? Reboot? Non-responding applications yet mouse cursor is moving?

quote:

I suspected some thermal issue first, but the CD drive doesn't get particularly hot :confused:
"Thermal issue" would usually be CPU getting hot, not CD.

quote:

Could it be the fact that my Dad's machine has an Athlon 64 CPU?
No.

quote:

Is there some error log I could check for unusual entries?
Not on a live CD installation.

quote:

Maybe running everything from RAM instead of the CD would help - how would I do this?
You won't -- Ubuntu live CD does not have this option. You can install Ubuntu on a hard drive though -- it will even resize the partitions for you.

quote:

Any help is, as always, appreciated :)
0. Post your hardware configuration. How would anyone be able to spot a known-unreliable hardware or something that is not supposed to work until some proprietary driver is installed?

1. Run memtest from Ubuntu CD. If it shows any errors your RAM, CPU or motherboard is broken.

2. Burn another CD. Ubuntu CD uses almost all space available on CD, so it's easy to make a CD that works in one drive and doesn't in another one, or works unreliably.

3. Boot CD with another CD drive (same reason as above).

teapot
Dec 27, 2003

by Fistgrrl

Soggy Chips posted:

I've got a wee 4x400gig mdadm array running on a ubuntu box sitting down in the basement, question is can I simply extend the array to have another 400 in it keeping the existing data?

and which command do I use as there is growing and rebuilding and I don't want risk the wrong option with that much data

What kind of RAID configuration is that?

teapot
Dec 27, 2003

by Fistgrrl

Fortuitous Bumble posted:

I've been trying to get my laptop to suspend to RAM properly with gentoo. I compiled the suspend-2 kernel and installed vbetool to get my monitor to turn back on, now it seems to suspend properly, but when I unsuspend it reboots the computer.

Any idea what kind of steps I could take to figure out why it's doing this? I was working on it a while ago and then I sort of stopped, so I'm not sure where to start for getting this working right.

suspend2 does not suspend to RAM, it hibernates, so laptop has to be rebooted to resume. Suspending to RAM involves ACPI, and on some laptops it's broken in various ways that may be still unsupported.

hedge77
Feb 10, 2004

Fear the 'Fro
Note: This isn't actually a linux system (2k server), but it does have cygwin which is what I normally use for poo poo like this.

it seems like this should be easy, but maybe i'm just a retard. I really hate (and I'm using hate in the strongest possible way here) this system so I'm getting frustrated with it at a greater than normal rate.

there is a complicated directory structure with bunches of subfolders. Everything I need is under d:\bitch\ somewhere (using /cygdrive/d/bitch/blah where appropriate).

d:\bitch\
d:\bitch\aint\
d:\bitch\aint\poo poo\
d:\bitch\wheres\
d:\bitch\wheres\my\
d:\bitch\wheres\my\money\
d:\bitch\please\aardvark\
d:\bitch\please\antelope\
...
d:\bitch\please\zebra

Some of them have a text file in them called lets say 'ihateyou.fkr'. What I need to do is find all the 'ihateyou.fkr' files, extract the contents (all of them should be one line, no newline, with an email address), and direct that into a file so I get a list, one per line.

So far I've got:

cat `find . -name ihateyou.fkr` >> /cygdrive/c/infidels.txt

The problem is the lack of newlines, I get a bunch of run-on addresses. There are a couple that for whatever reason do have the newline already (how they got them I don't know, these are all normally generated by a cgi script and should be uniform). I've tried using echo to add newlines with -exec and with xargs but that doesn't work. Extra newlines are ok (easy to check for later), so I don't mind having extra ones here and there.

Is there a way to get what I want in a single command (preferably) or a simple script?

Al Azif
Nov 1, 2006

hedge77 posted:

The problem is the lack of newlines, I get a bunch of run-on addresses. There are a couple that for whatever reason do have the newline already (how they got them I don't know, these are all normally generated by a cgi script and should be uniform). I've tried using echo to add newlines with -exec and with xargs but that doesn't work. Extra newlines are ok (easy to check for later), so I don't mind having extra ones here and there.

code:
for x in `find . -name ihateyou.fkr`; do cat $x >> /cygdrive/c/infidels.txt; echo >> /cygdrive/c/infidels.txt; done
Should work (as long as there are no spaces in the filenames). xargs or -exec should work too, but I've never bothered to figure them out.

hedge77
Feb 10, 2004

Fear the 'Fro

Al Azif posted:

code:
for x in `find . -name ihateyou.fkr`; do cat $x >> /cygdrive/c/infidels.txt; echo >> /cygdrive/c/infidels.txt; done
Should work (as long as there are no spaces in the filenames). xargs or -exec should work too, but I've never bothered to figure them out.

works great, thanks.

The Human Cow
May 24, 2004

hurry up
I'm using Kubuntu and trying to figure out how I can erase a network alias. My fileserver, omnion, is no longer located at 192.168.0.36 but is now at 192.168.0.5. When I ping omnion, it tries to ping 192.168.0.36. I don't remember setting this up anywhere, but it's entirely possible I did and forgot about it. Is there any way I can make Kubuntu forget about where it thinks omnion is and tell it where it really is?

hedge77
Feb 10, 2004

Fear the 'Fro
look through /etc/hosts and see if it's listed there, otherwise are you running a local DNS server that you need to update?

CAPS LOCK BROKEN
Feb 1, 2006

by Fluffdaddy
Quick question: If I plan on dual booting Linux and XP using GRUB as the bootloader, what's the order that I should install the two in? Is it possible to add a current XP install in the bootloaders as well?

The Human Cow
May 24, 2004

hurry up

hedge77 posted:

look through /etc/hosts and see if it's listed there, otherwise are you running a local DNS server that you need to update?

There's nothing about it in my hosts file. I don't think I'm running a DNS server. I haven't set one up or anything.

m5
Oct 1, 2001

The Human Cow posted:

There's nothing about it in my hosts file. I don't think I'm running a DNS server. I haven't set one up or anything.

What does
code:
host -a omnion
say?

Soggy Chips
Sep 26, 2006

Fear is the mind killer

teapot posted:

What kind of RAID configuration is that?

Silly me, running software raid 5 with mdadm

Smackbilly
Jan 3, 2001
What kind of a name is Pizza Organ! anyway?

Peven Stan posted:

Quick question: If I plan on dual booting Linux and XP using GRUB as the bootloader, what's the order that I should install the two in? Is it possible to add a current XP install in the bootloaders as well?

You can install them in either order, but if you install Linux first, XP will overwrite the boot loader and you will have to use a Rescue CD or Live CD to get back into Linux to restore grub. So it's easier (but not necessary) to install Windows first.

And yes you can add existing Windows installations to the loader. See here: http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_4.html

The Human Cow
May 24, 2004

hurry up

m5 posted:

What does
code:
host -a omnion
say?

code:
mwar@laptopwarren3:~$ host -a omnion
Trying "omnion"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60737
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;omnion.                                IN      ANY

;; ANSWER SECTION:
omnion.                 0       IN      A       192.168.0.36

Received 40 bytes from 192.168.0.1#53 in 8 ms

Smackbilly
Jan 3, 2001
What kind of a name is Pizza Organ! anyway?

The Human Cow posted:

code:
mwar@laptopwarren3:~$ host -a omnion
Trying "omnion"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60737
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;omnion.                                IN      ANY

;; ANSWER SECTION:
omnion.                 0       IN      A       192.168.0.36

Received 40 bytes from 192.168.0.1#53 in 8 ms

I'm assuming that 192.168.0.1 is your router. This means your router's DNS server is telling you the .36 address. If you are sure that that address is wrong, then the router must be in some sort of confused state and probably needs to be reset.

One possibility might be if you just recently changed ominon from DHCP to static ip without releasing its lease, the router might still think that ominon is located at .36 because it still has a DHCP assignment to that effect.

The Human Cow
May 24, 2004

hurry up

Smackbilly posted:

I'm assuming that 192.168.0.1 is your router. This means your router's DNS server is telling you the .36 address. If you are sure that that address is wrong, then the router must be in some sort of confused state and probably needs to be reset.

One possibility might be if you just recently changed ominon from DHCP to static ip without releasing its lease, the router might still think that ominon is located at .36 because it still has a DHCP assignment to that effect.

That did the trick. The router was trying to assign .0.36 to omnion via static DHCP, and I had forgotten that I'm using a new network adapter in omnion. I had completely forgotten to check that. Thanks a lot!

CAPS LOCK BROKEN
Feb 1, 2006

by Fluffdaddy

Smackbilly posted:

You can install them in either order, but if you install Linux first, XP will overwrite the boot loader and you will have to use a Rescue CD or Live CD to get back into Linux to restore grub. So it's easier (but not necessary) to install Windows first.

And yes you can add existing Windows installations to the loader. See here: http://www.linuxselfhelp.com/gnu/grub/html_chapter/grub_4.html

Thanks dude. I've got the nVidia driver for Ubuntu installed but it doesn't seem to work very well with my LCD montor. It's a 20.1 inch Starlogic and the nvidia-settings app won't let me go above 640x480@60Hz. I used ddcprobe and it gave me this bullshit:
code:
steve@tedbundy:~$ sudo ddcprobe
vbe: VESA 3.0 detected.
oem: NVIDIA
vendor: NVIDIA Corporation
product: G73 Board - p345h0 Chip Rev
memory: 262144kb
mode: 640x400x256
mode: 640x480x256
mode: 320x200x64k
mode: 320x200x16m
mode: 640x480x64k
mode: 640x480x16m
edid: 
edidfail

Right now should I just edit my xorg.conf file to force it into a higher resolution? The strange thing is that Ubuntu plays nice with a 17" LCD I have.

teapot
Dec 27, 2003

by Fistgrrl

Soggy Chips posted:

Silly me, running software raid 5 with mdadm

You can reshape raid5 arrays, so yes, this is possible. See http://scotgate.org/?p=107 for example.

teapot fucked around with this message at 03:00 on Jun 15, 2007

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
With the SA search feature disabled right now I find it hard to search for my query:

Is there a way to create a simple script that allows me to connect to an SSH session WITHOUT prompting for a password (hardcoded into the script?)?

Jo
Jan 24, 2005

:allears:
Soiled Meat
What are the chances running apt-get update; apt-get upgrade; will totally gently caress my system? I've had it happen a few times before, so I'm wary. At the same time, I can't help but feel it's a really bad idea to not patch software. Is there some other alternative where I don't risk screwing up everything I've configured?

6174
Dec 4, 2004

Jo posted:

What are the chances running apt-get update; apt-get upgrade; will totally gently caress my system?

It is highly dependent upon your distribution and the specific version. For instance if you're running Debian Stable, not too likely. If you are running Debian Unstable or even Testing the chances are much higher. The way to check if you'll screw something up is to run something like apt-listbugs, and/or monitor the the appropriate venue for your distribution where people report when poo poo breaks (such as for Debian the mailing lists debian-users and debian-devel and possibly specific lists for programs you are particularly dependent upon).

L
Aug 10, 2004
Loser

Crush posted:

With the SA search feature disabled right now I find it hard to search for my query:

Is there a way to create a simple script that allows me to connect to an SSH session WITHOUT prompting for a password (hardcoded into the script?)?

You can do something like this
code:
#!/usr/bin/expect -f
spawn ssh -l <username> <host>
expect "*password:*"
send -- "<password>\r"
interact
But setting up RSA authentication and a key with no password would work too and be better if your server's configuration will let you do that.

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.

L posted:

You can do something like this
code:
#!/usr/bin/expect -f
spawn ssh -l <username> <host>
expect "*password:*"
send -- "<password>\r"
interact
But setting up RSA authentication and a key with no password would work too and be better if your server's configuration will let you do that.

Hmm, this looks like it will work, except, what do I do with it? Does it need to be in a certain directory? CHMOD'd to a certain permission?

Thanks for your help.

Adbot
ADBOT LOVES YOU

L
Aug 10, 2004
Loser
Probably $HOME/bin chmodded to 700.

Then make sure $HOME/bin is in your path.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply