Command for SSH with @ in User Name


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Command for SSH with @ in User Name
# 8  
Old 06-17-2011
Not sure if this will work, but you can try this as well:

Code:
> sftp -oPort=22 user\\@name@hostname

Notice, the double escape... one is for the shell and another for sftp.
This User Gave Thanks to a_programmer For This Post:
# 9  
Old 07-11-2011
Just an update to this issue...the script worked to get to the site, but we still had to manually put in the password. We couldn't get the script to continue after it called the .ssh file. The only resolutions we could find is to get the trading partner to change the @ symbol to something else, or to come to us to pick up the file.
# 10  
Old 07-11-2011
Have you tried logging in without a password, with a key?

Create a key, e.g. with command ssh-keygen -t dsa. You'll be prompted for a passphrase.
That creates id_dsa (your secret key) and id_dsa.pub (your public key) in ~/.ssh.
Copy the .pub file to the remote host in your ~/.ssh/authorized_keys file. Create or append.
You may need to set the mode on authorized_keys to 0600.

Now when you log in you'll be prompted for the passphrase to decrypt your secret key.
If you don't want to be prompted everytime, install the keychain package and create a ~/.keychain directory.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. UNIX for Advanced & Expert Users

Passwordless ssh for different user

Hello Folks, I lost touch in ssh key gen topics. I am in need of ssh to a server without password, kindly help me in configuring. I have two servers, server1 with user name apha & server1 with user name beta. I need to ssh to the server2 from server1 with respective users, Manually i... (3 Replies)
Discussion started by: Thala
3 Replies

3. HP-UX

Restrict ssh for particular user

Dear Concern, We want to restrict ssh for particular user "oracle". Our HP UX version is as below. Please advise. # uname -a HP-UX tabsdb02 B.11.31 U ia64 2963363594 unlimited-user license (2 Replies)
Discussion started by: makauser
2 Replies

4. Programming

Trying to ssh as another user and cd to directory

I can ssh to another directory by doing the following: for server in server1; do ssh -t $server1 "cd /tmp; 'ls'";done However, if I try to do it as another user it fails: I have tried: for server in server1 do dir=$(su - nbadaccount -c "ssh $server `cd '/tmp/TSTCON'` " ) pwd... (3 Replies)
Discussion started by: newbie2010
3 Replies

5. UNIX for Dummies Questions & Answers

SSH: don't specify a user

How can I tell ssh to ask for the username at the prompt instead of passing one in via the -l parameter or $username@$server on the command line? I know that when I connect to an ssh server via putty, if I don't specify a username when connecting, the ssh server will ask for the username. I'm... (1 Reply)
Discussion started by: dangral
1 Replies

6. AIX

passwordless entry using ssh from one user to a different user on the same server

Hi, We have a requirement to do passwordless entry from one user to a different user on the same AIX server using ssh keys. Can some one help me with this? Thanks in advance, Panditt (3 Replies)
Discussion started by: deshaipet
3 Replies

7. Red Hat

Cannot ssh for a user

This is the entry when I tail /var/log/secure when I ssh for user "nightly"... Aug 4 03:19:48 itanium2 sshd: Illegal user nightly from ::ffff:10.91.220.35 Aug 4 03:20:10 itanium2 sshd: Failed password for illegal user nightly from ::ffff:10.91.220.35 port 32862 ssh2 What could be... (3 Replies)
Discussion started by: kirtikjr
3 Replies

8. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

9. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

10. Shell Programming and Scripting

How to use ssh command in the shell script without user intervention?

Hello All, I need your help, i would like to know how to use ssh command in the shell scripts? and make the script continue to enter the password without user intervention example of the normal commands written manually: # ssh 172.30.1.256 -l mxread password: mxread Thanks in advance (3 Replies)
Discussion started by: Dendany83
3 Replies
Login or Register to Ask a Question