Scp works when logging with my user id but fails when using another one

Hello all:
I wrote a script that uses scp to transfer specific local files to a server. The script takes the user id and password and pass them as scp's parameters for authentication.
Everything works fine when I uses my own user id to test the script but it fails when I used another id (with ligitimate password) to do the same thing.
I suspect it's a privilege issue. Both ids belong to the same group. Where should I look to fingure this out?
Thanks,
John

SCP is part of SSH. SSH requires the exchange of authorization keys to prevent man-in-the-middle attacks.
When you log in the first time you may see a prompt like:
RSA key fingerprint is 98:2e:d7:e0:de:9f:ac:67:28:d2:42:2e:37:16:58:45.
Are you sure you want to continue connecting (yes/no)?
This might be where your script fails. Since it prompts only the first time, you may just have to do one interactive SSH login to create an entry in ~/.ssh/known_hosts
Or setup User equivalence to omit the exchange of passwords.
You may find the following interesting:
Oracle Linux 5 Howto: Installing and using cURL with support for SCP and SFTP
OL5 Howto: Installing and using cURL with support for SCP and SFTP
see 3) Set up SSH user equivalence for SCP and SFTP

Similar Messages

  • I just created a new profile/user on my MacBook Pro. My pointer/mouse. It works fine in my older user profile, but when I go to the new profile my mac will not respond to clicks. Mouse moves but will not click. Already tried restarting and the pram zap.

    I just created a new profile/user on my MacBook Pro. My pointer/mouse on my trackpad. It works fine in my older user profile, but when I go to the new profile my mac will not respond to clicks. The Mouse moves but will not click. Already tried restarting and the pram zap. The problem starts when I log out of my main profile. I get to the login screen and my laptop stops responding to clicks. When I manage to make my way back to my main profile the mouse works perfectly.  Should I just delete the new profile and try again?

    If the modem is also a router, either use the modem in bridge and run pppoe client on the TC.. that is assuming ADSL or similar eg vdsl. If it is cable service.. and the modem is a router, then bridge the TC.. go to internet page and select connect by ethernet and below that set connection sharing to bridge.
    Please tell us more about the modem if the above gives you issues.

  • I have an iPhone 4S and never had a problem with syncing it. But suddenly, when I connected my phone to my mac, it says that its in recovery mode, and I need to restore it in order to sync. I've updated both my phone and my itunes, and it didnt work.Help?

    I have an iPhone 4S and never had a problem with syncing it. But suddenly, when I connected my phone to my mac, it says that its in recovery mode, and I need to restore it in order to sync. I've updated both my phone and my itunes, and it didnt work.Help?

    fighter19lisa wrote:
    that only makes it say its synced, when its not.
    No, it does not.  It transfers purchases from the iDevice to the computer.  The computer must be authorized for the Apple ID that the content was acquired with.
    fighter19lisa wrote:
    my playlists wont show up on the phone.
    Are they selected to sync?  Is Manually Manage content on the device selected?
    fighter19lisa wrote:
    i had to change my password for my aol account again and i still cannot get my email on my phone to even work
    What does that have to do with syncing content to the device?  FYI, nothing.

  • Unit test runs perfectly fine with NUnit but fails when run from TestExplorer

    Hello all,
    I have a TestProject, Harmony.Tests. In there, I have a method AddApplicationEvent()
    which calls another method Send(InvokeRequestMessage requestMessage) which calls a webservice (OperationHandlerBrokerWebService). 
    The code snippet looks like this. This is not the complete code but a part where we are calling the web service. It fails on the underlined Italic line of code.
    OperationHandlerBrokerWebService brokerService = new OperationHandlerBrokerWebService();
    brokerService.UseDefaultCredentials = true;
    brokerService.Url = address;
    brokerService.Timeout = timeoutInMilliseconds;
    byte[] serializedResponseMessage = brokerService.InvokeOperationHandler(serializedRequestMessage);
    The same test works and passed fine when I ran it with NUnit, but failed with following exception when I tried to run it from TestExplorer. 
    Test Name: AddApplicationEvent
    Test FullName: N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.AddApplicationEvent
    Test Source: d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs : line 665
    Test Outcome: Failed
    Test Duration: 0:00:00.296
    Result Message:
    SetUp : Message returned System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.
    at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)
    at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info)
    at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info, StreamingContext context)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
    at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
    at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
    at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
    at System.Runtime.Serialization.ObjectManager.DoFixups()
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
    at N4S.Forms.OperationHandlerBroker.AMessage.DeserializeMessage(Byte[] serializedMessage)
    at N4S.Forms.OperationHandlerBroker.WebServiceServer.BrokerService.InvokeOperationHandler(Byte[] serializedInvokeRequestMessage)
    --- End of inner exception stack trace ---
    expected: <0>
    but was: <1>
    Result StackTrace:
    at N4S.Harmony.Tests.TestHelper.InvokeOperation(OperationHandler handler, OperationHandlerInput input, Boolean expectedToWork) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 136
    at N4S.Harmony.Tests.TestHelper.LoginAsUser(String username, String password) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 394
    at N4S.Harmony.Tests.TestHelper.Login(TestUserName requestedUser) in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 377
    at N4S.Harmony.Tests.TestHelper.LoginAsAdvisor() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\TestHelper.cs:line 230
    at N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.Login() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs:line 76
    at N4S.Harmony.Tests.CaseManagement.HarmonyFacadeTests.SetupTest() in d:\TFS\TMW\Dev\TMWOnline\Harmony\N4S.Harmony.Tests\CaseManagement\HarmonyFacadeTests.cs:line 67
    I am not sure what causing the issue. I checked the Credentials, Windows Identity during both the test run and there is no difference. Please advise !!
    Thanks,
    Deepak

    Hi Tina,
    Thanks for your reply. 
    I do have NUnit adapter installed. I even noticed that the test runs fine with NUnit GUI and also if I run it through Resharper Test Explorer window. 
    As you can see in the image above the same test is passed when I ran it from Resharper Unit Test Explorer window but fails when I ran it from Test Explorer window. I also captured the information on fiddler. 
    There was a significant difference in the Header Content length. Also under the User-Agent property the protocol versions are different. 
    Not sure why VSTest ExecutionEngine is picking a different version.
    The UnitTest in question is calling a webservice method which in turn calls a method from another referenced project. 
    Web Service class
    using System;
    using System.Web.Services;
    using N4S.Forms.OperationHandlerBroker.Server;
    using NLog;
    namespace N4S.Forms.OperationHandlerBroker.WebServiceServer
    /// <summary>
    /// The operaton-handler broker service.
    /// </summary>
    [WebService(Description = "The N4S Forms Operation-Handler Broker Web-Service.", Name = "OperationHandlerBrokerWebService",
    Namespace = "N4S.Forms.OperationHandlerBroker.WebServiceServer")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class BrokerService : WebService
    { /// <summary>
    /// Calls <see cref="HandleRequest"/>. Updates performance-counters.
    /// </summary>
    /// <param name="serializedInvokeRequestMessage">the binary-serialized <see cref="InvokeRequestMessage"/></param>
    /// <returns>the binary-serialized response message</returns>
    [WebMethod(BufferResponse = true, CacheDuration = 0, Description = "Invokes the requested operation-handler and returns a binary-serialized response-message.", EnableSession = false)]
    public byte[] InvokeOperationHandler(byte[] serializedInvokeRequestMessage)
    logger.Trace(Strings.TraceMethodEntered);
    PerformanceMonitor.RecordRequestStarted();
    InvokeRequestMessage requestMessage = (InvokeRequestMessage) AMessage.DeserializeMessage(serializedInvokeRequestMessage);
    InvokeResponseMessage responseMessage;
    try
    responseMessage = HandleRequest(requestMessage);
    PerformanceMonitor.RecordSuccessfulRequest();
    catch (Exception)
    PerformanceMonitor.RecordFailedRequest();
    throw;
    finally
    PerformanceMonitor.RecordRequestEnded();
    logger.Trace(Strings.TraceMethodExiting);
    return AMessage.SerializeMessage(responseMessage);
    UnitTest snippet
    OperationHandlerBrokerWebService brokerService = new OperationHandlerBrokerWebService();
    brokerService.UseDefaultCredentials = true;
    byte[] serializedResponseMessage = brokerService.InvokeOperationHandler(serializedRequestMessage);
    Please advise.
    Thanks,
    Deepak

  • SSIS package works in development environment but fails when job scheduler executes, file path invalid

    SIS package works in development environment but fails when job scheduler executes, file path invalid
    Relatively simple package to get OLE-DB connection to MS FoxPro 9.0 DB
    The failure in the job log states that the path is invalid its a network path (\\192.168.1.xxx\foldername) this has been run several ways with the remote computer being mapped as a network drive and through the \\ notation described above.
    Thinking it was a security issue between the SQL agent account and my account I tested by subsitution myself as a proxy account for the agent when running this job, again same result failed on network path.
    One issue I see is that the remote computer is running Server 2000 (legacy software incompatable with newer versions) 
    Is it possible that this is a security issue, since if i understand correctly the current MS domain security model didn't exist until Server 2003.

    Hi REIData,
    Have you got the issue resolved? Based on your description, please make sure the target folder is shared properly. If the computer on which the SQL Server Agent job runs doesn’t join the domain as the server that hosts the shared folder, you have to share
    the folder with everyone by adding “Everyone” to the people list on the File Sharing page of the folder and assign "Read/Write" permission to it.
    Regards,
    Mike Yin
    TechNet Community Support

  • Logon of user in client failed when starting a step

    Hi All,
    I have a question. (Might be simple to many).
    <b>Logon of user in client failed when starting a step.</b>
    Some of my scheduled jobs are getting cancelled due to the above error. It has been noted that the user corresponding to that job has been locked.
    Can anybody suggest how to change the user of a Background Job (without deleting and re-creating the same).
    Thanks and Regards
    Devanand

    Hi
    You cannot change the owner of the job once it is in released status.
    Better, create the job with same varient by an existing user and delete the cancelled job.
    regards,
    Vinodh.

  • I keep getting connection failed when i try and log in, I keep getting connection failed when i try and log in

    I keep getting connection failed when i try and log in, I keep getting connection failed when i try and log in

    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Can't update software because a message appears that I have to log with the same Apple ID that was used to purchase them: iMovie, Garage Band

    I can't update software because a message appears that I have to log with the same Apple ID that was used to purchase them: iMovie, Garage Band, iPhoto, but those apps came with OSX Lion.
    How can I get the "original" Apple ID?

    Support Downloads
    http://support.apple.com/downloads/
    Luckily, there is always more than one way to update software.

  • When I try to buy an app it won't let me log in and says that I need to use another Apple ID on my iPad 2

    When I try to buy an app it won't let me log in and says that I need to use another Apple ID on my iPad 2

    Is your Apple ID set properly at Settings > iTunes & App Stores?
    If so, log out from there and log back in.
    If that doesn't solve it (it should), check Settings > General > Restrictions

  • I have Adobe Elements 9 and I used to be able to export HD 1080p videos with no issue. But recently, when I export using H.264 MPEG or MPEG 2, which I normally used, the high resolution videos come out very choppy.  How can i fix this?

    I have Adobe Elements 9 and I used to be able to export HD 1080p videos with no issue. But recently, when I export using H.264 MPEG or MPEG 2, which I normally used, the high resolution videos come out very choppy.  How can i fix this?

    mr
    Are you running the 9.0.1 Update of the program and on what computer operating system is it running?
    Is your video card/graphics card driver up to date according to the manufacturer of the card?
    Is your computer optimized, including maintenance of pile ups of preview files, conformed audio files, and conformed video files?
    Do you have the latest version of QuickTime installed on your computer with Premiere Elements 9.0/9.0.1?
    What are your project settings and what are the properties of your source media? When you say that "used to be able to export...." is that on the same computer, same brand/model/settings for the camera recording the video now in use, same Premiere Elements 9.0/9.0.1?
    Where player are you using for the playback of these exports?
    Please give us more details on the size of the projects (then and now) as well as details of the customized export settings in your Share/Computer/ route. Premiere Elements 9.0/9.0.1 is only a 32 bit application running in 32 bit or 64 bit system. Not sure if computer resources might be taxed more so now than before.
    More later.
    ATR

  • I installed Lion OS, after restart it gives the startup screen with my user id but no window for password entry, no matter what I do I can't get past the opening screen.

    I installed Lion OS, after restart it gives the startup screen with my user id but no window for password entry, no matter what I do I can't get past the opening screen.

    MacBook Pro
    MacBook Pro Apple Support
    Apple Support Lion
    Lion Mac OS X Communities

  • I run a mac air on a single user account but multiple people using it, which is ok for the situation. All have their accounts in the apple mail app. what is missing for me is a separate password to access the mail account. otherwise anyone can see anyones

    I run a mac air on a single user account but multiple people using it, which is ok for the situation. All have their accounts in the apple mail app. what is missing for me is a separate password to access the mail account. otherwise anyone can see anyones
    Any clue, how i can add a mail account to apple mail app, but with separate password / pin to open it.
    Years ago there was a program called mail switcher which added this functionality, but thats gone.
    cheers
    Tom

    They would have to be logged in as separate users in order not to see your account in Mail. Whatever accounts put in Mail under your account will show up. All mail accounts usually have there own user and password. The only thing you can do is to remove the password from Keychain and take the account offline so you don't keep getting prompts for passwords each time it checks for mail.
    Not a great solution.
    Best way is to give the other user their own user account with their own mail and enable fast user swithcing to log between the different users if all access the computer frequently.

  • Prompt user for input when rdp with same user as logged in

    What I am trying to achieve: user dragos is logged in on a domain computer. When I connect with rdp with the username dragos on the computer I want user dragos to be asked if he allows the connection or not not to be taken over.
    When you connect as different user it is being asked, but not when connecting as same user as logged in.
    Searching for solutions I found this: Administrative Templates\Windows components\Remote desktop services\Remote desktop session host\Connections\Set rules for remote control of Remote Desktop Services user sessions and give it Full control with user
    permission.
    But it does not work as I was expecting.
    Is there a solution for the logged in user to be promped if connecting with the same user name ?
    Thank you

    Hi,
    user dragos is logged in on a domain computer. When I connect with rdp with the username dragos on the computer I want user dragos to be asked if he allows the connection or not not to be taken over.
    As far as I know, there is no built-in method to achieve this.
    You may try to search whether there any third-party tools which can achieve this, or write a script.
    If you need assistance with scripting, here are some scripting forum links below for you:
    The Official Scripting Guys Forum
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Windows PowerShell Forum
    https://social.technet.microsoft.com/Forums/en-US/home?forum=winserverpowershell&filter=alltypes&sort=lastpostdesc
    MSDN Forums
    https://social.msdn.microsoft.com/Forums/en-US/home
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • BRTOOLS errno 13 when logged in as user sid adm

    Hi,
    Just upgraded to 7.2 (14) BRTOOLS, Netweaver on Oracle/UNIX platform.
    My brtools open when I'm logged in as ora<sid> user, however they fail with permissions on the Oracle directories when I try and run brtools as user <sid>adm.
    I've verified the file permissions against a known working instance on the br files and they are matching.
    The error I get is below, I know it must be file permissions somewhere, can someone advise, thanks.
    hneccscd01s:s02adm 4% brtools
    BR0651I BRTOOLS 7.20 (14)
    BR0252W Function stat() failed for '/oracle/S02/saptrace/diag/rdbms/s02/S02/trace/alert_S02.log' at location BrFileStatGet-1
    BR0253W errno 13: Permission denied
    BR0273W Determination of file status for /oracle/S02/saptrace/diag/rdbms/s02/S02/trace/alert_S02.log failed
    BR0252W Function stat() failed for '/oracle/admin/S02/adump' at location BrFileStatGet-1
    BR0253W errno 13: Permission denied
    BR0273W Determination of file status for /oracle/admin/S02/adump failed
    BR0252E Function fopen() failed for '/oracle/S02/112_64/dbs/initS02.ora' at location BrInitOraRead-1
    BR0253E errno 13: Permission denied
    BR0158E Error reading Oracle profile /oracle/S02/112_64/dbs/initS02.ora
    BR0280I BRTOOLS time stamp: 2011-08-26 15.01.42
    BR0654I BRTOOLS terminated with errors
    Cheers
    Richie
    SAP Basis

    Hi Richie,
    Are the environment variables properly set for <sid>adm and ora<sid>?
    Try to see if the dot (.) profiles in the home directories of <sid>adm and ora<sid> are consistent.
    Also, as ora<sid> recursively change the permissions for /oracle/S02/saptrace to 755 [chmod -R 755 /oracle/S02/saptrace]
    Also check the permissions of brtools executables in the /sapmnt/<SID>/exe on the database server.
    Normally, they should be something like shown below.
    -rwxr-xr-x 1 <sid>adm sapsys 1578637 Feb 20  2011 brrestore
    -rwsrwxr-x 1 ora<sid> sapsys 2303924 Feb 22  2011 brtools
    -rwsrwxr-x 1 ora<sid> sapsys 4178065 Feb 24  2011 brarchive
    -rwsrwxr-x 1 ora<sid> sapsys 4284895 Feb 24  2011 brbackup
    -rwsrwxr-x 1 ora<sid> sapsys 5527676 Feb 24  2011 brconnect
    -rwxr-xr-x 1 <sid>adm sapsys 4587371 Feb 24  2011 brrecover
    -rwxr-xr-x 1 <sid>adm sapsys 5679668 Feb 24  2011 brspace
    Br,
    Venky.

  • Error Message when logging on 2nd user on XP

    I have an XP system with two users. For the past week or so, an error has been displaying when you log on the 2nd user. The error is an IE explorer window that says "This Web Page can not be displayed" and there is a little red Verizon logo in the upper left corner.
    I ran MSConfig on the 2nd user and there is a line to run something called redirector. The command line is:
    C:\Program Files\Verizon\McciBrowser.exe -AppKey=Verizon -URL=file://C:\Program Files\Verizon\OfflineUpdate\redirector.htm
    I do not have this line in my startup on User1. I also do not have a folder called OfflineUpdate under my Program Files\Verizon which is why it is failing. I suspect that what ever it was removed itself after it ran and a multi-user logon was not considered in the program design. But I'm not certain. I have FIOS Internet, TV and phone. No blackberry or other device that I may sync mail to.
    Does anyone have any idea what this is?  My plan is to either disable it with MSConfig - or just remove the RUN key from registry but I'd like to have an idea of what it was
    Thanks in advance.

    Nothing wrong with disabling it in MSConfig for testing reasons.
    It causes issues, you can re-enable it.
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

Maybe you are looking for

  • VL10C & VBBE mismatch

    I want open sales order report from sap system. I've found some difference in VL10C & data received from table VBBE. Few orders found in VBBE but not in VL10C. Harsh

  • Premiere CC freeze on export and sometimes during rendering

    I have a small project which has four mpeg2 clips in .mov containers, the Fast Color Corrector, Red Giant Looks and Dynamics effects applied to each clip and some title elements. The sequence in Premiere CC seemed to be working fine until the 2.5 upg

  • Flex optimization

    Hey there, I was wondering if there are any techniques to reduce the filesize of my Flex application? With dynamic linking, it's 41k. With static linking, it's about 300k. What's all that extra heavyweight that brings it up to 300k? And by my underst

  • Message no. QE214,No characteristics were found

    Hi, I did RR for a lot with inspection type 01. i valuated and closed all MIC.after saving the result recording again i i want to see the result in QA32 tab(change-display,Shift+F1),i am not able to see any results what i recorded. getting Msg- No ch

  • Where is Captured Models and Converted Models in SD 3.0.03?

    Hi, I was using OSD 2.1 and was using captured Models and Converted Models view to migrate my SQL Server database objects. I can not find it in new version of OSD 3.0.03. Is there any flow change in this release? Where can I find these two views? Als