General :: Login Via SSH Without Writing IP Address?
Sep 17, 2011
When I login I always do:
ssh myuser@111.111.111.111
Is it possible to do something like:
ssh myuser@server1
I would like to use a name, not an IP address, is it possible?
View 2 Replies
ADVERTISEMENT
Mar 12, 2010
After logging onto a linux machine via SSH, I would like to be able to retrieve the name of the computer from which the connection was made. Ideally I am looking for some command like hostname or uname but that would retrieve the name of the client instead of the host.
This information must be accessible somewhere, since when I log on I get a message that contains the clinent name from the last login:
Last login: Thu Mar 11 18:42:01 2010 from my.address.com
The reason for wanting to do this is to be able to take different action in my .login file depending on which computer I am currently connecting from.
View 1 Replies
View Related
Jan 26, 2009
I am having a problem logging into my remote gentoo (2.6.23) linux machine using my hostname from my Windows XP machine using cygwin. I can login using my ip address, but not the hostname.
This works:
$ ssh me@xxx.xxx.xx.xxx
This does NOT work:
$ ssh me@my_hostname
ssh: connect to host my_hostname port 22: Connection refused
I have verified that my hostname is indeed "my_hostname" on my linux machine by using the "hostname" command.
View 7 Replies
View Related
Apr 6, 2010
properly set up ssh to only allow one IP address to login remotely
View 2 Replies
View Related
Jul 20, 2011
what is Production IP address and Management IP address in Linux servers? What is the significance of these two? When to use what?
View 3 Replies
View Related
Apr 13, 2010
How can I get the physical address corresponding to a virtual address in linux by using /proc file system
View 1 Replies
View Related
Jul 19, 2010
im REALLY new with linux and ive downloaded and installed Ubuntu...now heres the question.how do i set up WLAN internet use? ive tried using ipconfig/all on windows command but im not sure which info to use where save for the Physical Address going towards the MAC Address info
View 14 Replies
View Related
Mar 25, 2010
My VPN is behaving funny sometimes, and I have to restart it often.I wanted to write a script which does that for me.It doesn't have to be anything fancy, just a shortcut for the commands I have to type into the terminal. More specifically: it will look at the running processes.If it finds a running vpnc process, it will kill it. Then it will start vpnc.I've written bash scripts of similar complexity,but now I don't have a bash,only an ash. Until now, the only difference I noticed is that there are much less commands available, but then, I don't use it very often.So I have some questions.
Is writing ash scripts different than writing bash scripts?
Is there something specific to consider when doing it?
When the script is ready, how can I deploy it? For bash, I just put the executable file under /usr/lib and run it by typing the file name into the command line, will this work with ash?
Are there any special pitfalls to watch out for in the script I want to write? I think that the killing process part may get hairy, if I write something that kills the wrong process, but even then running the script shouldn't break anything permanently, right?
View 2 Replies
View Related
Mar 3, 2011
i am having a the following line in a file
<property name="connection.password"></property>
i have to give password in this line, like this
<property name="connection.password">XXXXXX</property>
Is this possible to acheive this using sed command
Beause i have to do this for n number files. so if i have option in sed for this the i will be doing this using script.
View 7 Replies
View Related
Jan 25, 2011
user@user-laptop:~$ sudo dd if=sd_backup of=/dev/sdd bs=4M conv=noerror,sync
205520896 bytes (206 MB) copied, 28.564 s, 7.2 MB/s
247463936 bytes (247 MB) copied, 57.1285 s, 4.3 MB/s
260046848 bytes (260 MB) copied, 73.2388 s, 3.6 MB/s
289406976 bytes (289 MB) copied, 104.121 s, 2.8 MB/s
[Code]....
How come dd gets slower after copying this 8GB file? What can I do about it?
View 1 Replies
View Related
May 6, 2011
When you are performing time consuming operations in bash like installing new software, is it possible to write text that will appear at the prompt when the operation has finished.
E.g
Imagine running:
apt-get install eclipse-platform
Then it will use quite a while to finish while you see the installation log, meanwhile I want to create new folders (workspaces) which Eclipse later will use.
Is this possible without opening a new terminal (or tab)?
View 5 Replies
View Related
Sep 7, 2010
Basically I have a USB flash drive currently formatted under vfat. I can log in as root and the system automatically picks it up and automounts the drive successfully. What needs to happen is that a non-root user needs to be able write to this device while root has mounted this device. Due to other program constraints, I can not mount the device using another user so I have to do it with root.
View 9 Replies
View Related
Nov 10, 2010
My video card writes the CRT in one of two "modes". High intensity ("bright chars") and low intensity ("dim chars"). How do I set vim in order for him to use only low intensity?
View 2 Replies
View Related
Sep 29, 2010
When i Write commands in terminal it does nothing
View 1 Replies
View Related
May 3, 2010
How can we write arrayValues in file? Lets say arrayName=(1 2 3 4 5) Now if i want to write these arrayValues into file
In first line in file :1
In second line in file :2
In third line in file :3
In fourth line in file :4
In fifth line in file :5
View 3 Replies
View Related
Mar 18, 2010
I need to write an else-if condition in a makefile, and though the format is posted on several websites, nothing seem to be working, andI get an error everytime. Could anybody please write a small example with an else-if conditional in a maekefile?
View 1 Replies
View Related
Mar 18, 2010
I am using Grass GIS
I have written a script which outputs a list of numbers to a file
code snippet:
r.stats -1 fs=, input=Bones_AVE > /home/gary/AVE_monte_carlo/rstats_AVE$i.csv
so this makes acsv file with one column. I want to run it again but rather than outputing to a new csv i want to add it to this one as the next column. For this example there will be 100 rows per column.
the 1st one will make the file
[grassGIS code]> /home/gary/AVE_monte_carlo/rstats_AVE.csv
add ',' after each value
the next one
[grassGIS code] open file /home/gary/AVE_monte_carlo/rstats_AVE.csv
[Code]....
View 1 Replies
View Related
Jul 28, 2010
I am trying to write input to a shell and get the shell to parse the input that I am writing to it as if a user was typing in commands.
Thus far I have tried echoing some text into the shell's FD for STDIN in /proc/<pid>/fd Whilst this displays the text that I echo, the shell that I am writing to never tries to execute the command that I pass to STDIN. What is the difference between a shell taking STDIN from the user and data written to STDIN by another process e.g. echo ? It appears I am missing something fundamental.
View 5 Replies
View Related
Nov 18, 2010
I'm writing a script that among other things partitions and formats disks using SW RAID and LVM. I've read somewhere that for older versions of Linux it was a good idea to use the dd command to zero the first couple of blocks od a device before partitioning it (or formatting it?) Is this practice still recommended? To what end?
View 1 Replies
View Related
Jul 14, 2010
I've seen the trackpad tool to write chinese characters on macs, is there any such linux clone? Or are there any projects that anyone knows of which are trying to create that for linux?
View 1 Replies
View Related
Apr 11, 2011
Is it possible to write ksh script in the spec file? The target is after I perform
rpm -i my_rpm.rpm
According to the spec file, ksh script will do some installation & configuration. For example run other script and edit some files.
View 1 Replies
View Related
Mar 3, 2009
I have custom software that writes to a sensitive large file when the user does something. I would like to make backup copies of The file that gets written to, but if I make a gzip of the file at the same time someone is changing something, it will corrupt the backup because some of the data will be missing, as its backed up during being written to.
a) Is there a way to detect if a file is currently being accessed/written to?
That way if its currently being accessed, I can just make the script wait until its done and then finally back it up.
b) Instead of backing up the large file while it has potential to get written to, would it be better to make a copy of the file first, then gzip the copy? This idea comes from the fact that gzipping the original takes 5-10 seconds, whereas making a copy only takes 1-2 seconds. The less time, the less chance of corruption.
c) Is there anyway to freeze a program or a file to stop it from being written to for an amount of time?
With a, b, and c together. The best solution I have to my problem would be a script that first detects rather the file is being accessed. If not, it would then freeze the file/program and then make a quick copy of it. Once the copy is created, it will unfreeze the original file/program and then go about gzipping the copy.
View 3 Replies
View Related
Mar 27, 2011
I tried writing zreos to my HD but it denied permission. How do I get around that ?
View 6 Replies
View Related
May 9, 2010
I've used ext2ifs drivers to mount my ext3 partition in winxp, but I don't have write acces, it's mounted in a read-only mode, and i didn't check the rad-only box during the installation of the drivers.I've used help from the official site http://www.fs-driver.org/and this tutorial http://www.dedoimedo.com/computers/l...s-windows.html
It's a straithfoward proces so I dont understand what I did wrong.I'm using fresh xp install with (more or less) all the updates and ubuntu 10.04Also the partition is mounted at /home, so I dont know if that makes any diferance.
View 3 Replies
View Related
Nov 27, 2010
I left the linux world for a few years and now i am trying to re-learn my shell scripting basics. I am writing a script for an alarm clock, but i seem to be running into a few issues.
declare -i H
declare -i M
declare -i currentH
declare -i currentM
declare -i minutesLeft
[code]....
My script, instead of doing what it should, produces the following errors:
./alarm: line 19: echo 11: No such file or directory
./alarm: line 26: 6: command not found
[code]....
and if i choose the time 11:06, files called 11 and 6 are creating in the working directory. I am sure it is something really simple, but i haven't used linux or scripting on my computers in around 6 years.
View 11 Replies
View Related
Feb 12, 2010
My name is Barry and I have lost my job as a plumber because of the ecomony. I have been going to school for two years now at Ivy Tech in Indiana. Myself, along with other vets in my Linux System Administrator Class are in need of a tutor for this class. I go to school in Valporaiso, Indiana. The V.A. is willing to pay $60.00 per hour per person. We are all are willing to be tutored as individuals or as a group.
Tutoring 5 or so people at a time is $300.00 an hour, if you know what I mean! There are no tutors in this area we know about. This problem has been a on going problem with the school. You would have to sign up with V.A. so that you could get payed. You would get paid once a month. There are serveral vets in this area that need help and it would generate alot of money for someone out of work. You must be qualified by having experience, you don't have to be a teacher with a teaching degree.
View 4 Replies
View Related
May 17, 2011
I am using a new install of Kubuntu 10.04 LTS. My system is a 64-bit AMD desktop.
I use a small partition for my entire Kubuntu install, and use separate, larger partitions for my media and work files.
I opened up Dolphin (my KDE file manager) via GUI, navigated to my media partition, and attempted to create a new folder by
right-click->
Create New->
New Folder-> etc
The Create New in the menu is ghosted out, as if I have no permission to access it.
How can I write files to the drive?
View 14 Replies
View Related
Oct 26, 2010
I have two servers, 82 and 70.My exports file on 82 reads /...70(rw)on 70 I have a mountpoint called mnt_for_82I execute on 70mount -t nfs -o rw ...82:/ mnt_for_82I go to server 70 and indeed can read and travers the mounted subdirectories. However, I try to create a file or subdirectory under the mount point on 70 and I get a *Permission Denied* error.I'm sure there is a simple explanation for this issue as well as a correct nomenclature for what I'm trying to do in nfs
View 4 Replies
View Related
Oct 5, 2009
but I won't get any better at this unless I dive in, so here is the question in full that I am having trouble with and I'm sure you can all get a good laugh at:Write a shell script called nbin. First the script changes to the home directory. Then if there is a bin directory under the current directory, display the message bin has XX files". (Note: the XX will be substituted with the actual number of files in your bin directory)
So far I have done:
vi nbin
#!/bin/bash
PATH=/bin:$HOME/bin
View 12 Replies
View Related
Jul 26, 2011
how to match to find matches in two different files when comparing timestamps. The fields I'm wanting to match up are in the format:
Jul 26 09:33:02
I have tried reading the file line by line and using awk '{print $1,$2,$3}' which only gets and stores the timestamp in one of the files. I've been looking around and saw this example:
awk 'FNR==NR{!a[$3]++;next }{ b[$3]++ }
END{
for(i in a){
for(k in b){
if (a[i]==1 && i ~ k ) { print i }
}
}
}' $FILE $FILE2
Which sorta works but its way over my head at the moment. The two files can be found in your /var/log/syslog and /var/log/auth.log (using Ubuntu 11.04)
View 9 Replies
View Related